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

Percentage Accurate: 99.4% → 99.8%
Time: 3.9s
Alternatives: 17
Speedup: 1.0×

Specification

?
\[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
(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]
\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120

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 17 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.2% accurate, 0.8× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if x < -8.4000000000000006e110 or 6.79999999999999964e143 < x

    1. Initial program 99.4%

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

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

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

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

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

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

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

    if -8.4000000000000006e110 < x < 6.79999999999999964e143

    1. Initial program 99.4%

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

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

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

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

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

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

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

Alternative 3: 83.5% accurate, 0.4× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.99999999999999983e156 or 4.99999999999999991e108 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.4%

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

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

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

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

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

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

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

    if -9.99999999999999983e156 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999991e108

    1. Initial program 99.4%

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

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

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

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

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

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

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

Alternative 4: 73.0% accurate, 0.2× speedup?

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

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-39}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x}{t}, 120 \cdot a\right)\\

\mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-69}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 4 \cdot 10^{-88}:\\
\;\;\;\;120 \cdot a\\

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.9999999999999999e74

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.9999999999999999e74 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.99999999999999929e-40

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.99999999999999929e-40 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.9999999999999996e-70 or 3.99999999999999974e-88 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.4%

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

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

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

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

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

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

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

    if -9.9999999999999996e-70 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 3.99999999999999974e-88

    1. Initial program 99.4%

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

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

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

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

Alternative 5: 73.0% accurate, 0.2× speedup?

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

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-39}:\\
\;\;\;\;\mathsf{fma}\left(-60, \frac{x}{t}, 120 \cdot a\right)\\

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-69}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-88}:\\
\;\;\;\;120 \cdot a\\

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.9999999999999999e74 or -9.99999999999999929e-40 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.9999999999999996e-70 or 3.99999999999999974e-88 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.4%

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

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

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

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

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

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

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

    if -1.9999999999999999e74 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.99999999999999929e-40

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

    if -9.9999999999999996e-70 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 3.99999999999999974e-88

    1. Initial program 99.4%

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

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

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

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

Alternative 6: 67.8% accurate, 0.8× speedup?

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

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

\mathbf{elif}\;z \leq 1.15 \cdot 10^{+156}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{x}{z} \cdot 60\right)\\

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


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -2.1500000000000001e-35 or 1.1499999999999999e156 < z

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.1500000000000001e-35 < z < 1.5e-89

      1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(a, 120, \frac{\mathsf{neg}\left(\color{blue}{y \cdot -60}\right)}{\mathsf{neg}\left(\left(z - t\right)\right)}\right) \]
          7. distribute-rgt-neg-outN/A

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

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

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

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

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

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

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

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

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

          if 1.5e-89 < z < 1.1499999999999999e156

          1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 7: 67.8% accurate, 0.8× speedup?

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

          1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.1500000000000001e-35 < z < 1.5e-89

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

            if 1.5e-89 < z < 1.1499999999999999e156

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 66.9% accurate, 0.7× speedup?

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

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.2499999999999998e82 < t < -4.5999999999999996e-19 or 2.1e16 < t

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

            if -4.5999999999999996e-19 < t < 9.50000000000000044e-43

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 9: 66.9% accurate, 0.7× speedup?

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

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

            if -2.2499999999999998e82 < t < -4.5999999999999996e-19 or 2.1e16 < t

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

            if -4.5999999999999996e-19 < t < 9.50000000000000044e-43

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

          Alternative 10: 57.1% accurate, 0.3× speedup?

          \[\begin{array}{l} t_1 := 60 \cdot \frac{x - y}{z}\\ t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+208}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-69}:\\ \;\;\;\;\mathsf{fma}\left(-60, \frac{x}{t}, 120 \cdot a\right)\\ \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-88}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+150}:\\ \;\;\;\;-60 \cdot \frac{y}{z - t}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
          (FPCore (x y z t a)
           :precision binary64
           (let* ((t_1 (* 60.0 (/ (- x y) z))) (t_2 (/ (* 60.0 (- x y)) (- z t))))
             (if (<= t_2 -1e+208)
               t_1
               (if (<= t_2 -1e-69)
                 (fma -60.0 (/ x t) (* 120.0 a))
                 (if (<= t_2 4e-88)
                   (* 120.0 a)
                   (if (<= t_2 2e+150) (* -60.0 (/ y (- z t))) t_1))))))
          double code(double x, double y, double z, double t, double a) {
          	double t_1 = 60.0 * ((x - y) / z);
          	double t_2 = (60.0 * (x - y)) / (z - t);
          	double tmp;
          	if (t_2 <= -1e+208) {
          		tmp = t_1;
          	} else if (t_2 <= -1e-69) {
          		tmp = fma(-60.0, (x / t), (120.0 * a));
          	} else if (t_2 <= 4e-88) {
          		tmp = 120.0 * a;
          	} else if (t_2 <= 2e+150) {
          		tmp = -60.0 * (y / (z - t));
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          function code(x, y, z, t, a)
          	t_1 = Float64(60.0 * Float64(Float64(x - y) / z))
          	t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
          	tmp = 0.0
          	if (t_2 <= -1e+208)
          		tmp = t_1;
          	elseif (t_2 <= -1e-69)
          		tmp = fma(-60.0, Float64(x / t), Float64(120.0 * a));
          	elseif (t_2 <= 4e-88)
          		tmp = Float64(120.0 * a);
          	elseif (t_2 <= 2e+150)
          		tmp = Float64(-60.0 * Float64(y / Float64(z - t)));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(N[(x - y), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+208], t$95$1, If[LessEqual[t$95$2, -1e-69], N[(-60.0 * N[(x / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$2, 4e-88], N[(120.0 * a), $MachinePrecision], If[LessEqual[t$95$2, 2e+150], N[(-60.0 * N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$1]]]]]]
          
          \begin{array}{l}
          t_1 := 60 \cdot \frac{x - y}{z}\\
          t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
          \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+208}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-69}:\\
          \;\;\;\;\mathsf{fma}\left(-60, \frac{x}{t}, 120 \cdot a\right)\\
          
          \mathbf{elif}\;t\_2 \leq 4 \cdot 10^{-88}:\\
          \;\;\;\;120 \cdot a\\
          
          \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+150}:\\
          \;\;\;\;-60 \cdot \frac{y}{z - t}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 4 regimes
          2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.9999999999999998e207 or 1.99999999999999996e150 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

                \[\leadsto 60 \cdot \frac{x - y}{z} \]
              2. lower--.f6428.2

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

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

            if -9.9999999999999998e207 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.9999999999999996e-70

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

            if -9.9999999999999996e-70 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 3.99999999999999974e-88

            1. Initial program 99.4%

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

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

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

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

            if 3.99999999999999974e-88 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.99999999999999996e150

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 11: 56.3% accurate, 0.3× speedup?

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

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

                \[\leadsto 60 \cdot \frac{x - y}{z} \]
              2. lower--.f6428.2

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

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

            if -4.9999999999999996e249 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -9.99999999999999983e156

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

            if -9.99999999999999983e156 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 3.99999999999999974e-88

            1. Initial program 99.4%

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

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

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

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

            if 3.99999999999999974e-88 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.99999999999999996e150

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 12: 55.6% accurate, 0.4× speedup?

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

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

            if -9.99999999999999983e156 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 3.99999999999999974e-88

            1. Initial program 99.4%

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

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

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

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

            if 3.99999999999999974e-88 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 13: 55.6% accurate, 0.4× speedup?

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

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -9.99999999999999967e78 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 3.99999999999999974e-88

            1. Initial program 99.4%

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

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

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

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

          Alternative 14: 55.6% accurate, 0.3× speedup?

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

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(60 \cdot \frac{1}{z}\right) \cdot x \]
              6. mult-flipN/A

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

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

                \[\leadsto \frac{60}{z} \cdot x \]
            9. Applied rewrites16.3%

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

            if -9.99999999999999983e156 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 3.99999999999999972e-39

            1. Initial program 99.4%

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

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

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

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

            if 3.99999999999999972e-39 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.99999999999999996e150

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto 60 \cdot \frac{y}{t} \]
            10. Applied rewrites15.5%

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

          Alternative 15: 54.6% accurate, 0.5× speedup?

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

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \left(60 \cdot \frac{1}{z}\right) \cdot x \]
              6. mult-flipN/A

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

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

                \[\leadsto \frac{60}{z} \cdot x \]
            9. Applied rewrites16.3%

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

            if -9.99999999999999983e156 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999991e108

            1. Initial program 99.4%

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

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

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

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

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

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

          Alternative 16: 51.1% accurate, 0.5× speedup?

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

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

            if -9.99999999999999983e156 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999991e108

            1. Initial program 99.4%

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

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

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

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

          Alternative 17: 50.8% accurate, 4.6× speedup?

          \[120 \cdot a \]
          (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]
          
          120 \cdot a
          
          Derivation
          1. Initial program 99.4%

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

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

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

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

          Reproduce

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