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

Percentage Accurate: 99.3% → 99.8%
Time: 4.9s
Alternatives: 22
Speedup: 1.1×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 22 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.3% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 74.2% accurate, 0.3× speedup?

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

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

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

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

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


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

    if -1.7e14 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.0000000000000001e-110

    1. Initial program 99.8%

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

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

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

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

    if 1.0000000000000001e-110 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.99999999999999977e37

    1. Initial program 99.6%

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

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

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

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

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

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

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

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

      \[\leadsto -60 \cdot \frac{x}{t} + \color{blue}{120 \cdot a} \]
    7. 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. lift-*.f6467.7

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

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

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

    1. Initial program 98.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 58.7% accurate, 0.3× speedup?

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

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

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

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

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{+69}:\\
\;\;\;\;\frac{y}{z - t} \cdot -60\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.00000000000000006e84 or 1.00000000000000003e40 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 98.8%

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

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

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

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

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

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

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

    if -1.00000000000000006e84 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -5.00000000000000036e69

    1. Initial program 99.6%

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

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

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

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

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

        \[\leadsto \frac{y}{z - t} \cdot -60 \]
    5. Applied rewrites86.1%

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

    if -5.00000000000000036e69 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000003e40

    1. Initial program 99.7%

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

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

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

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

Alternative 4: 59.9% accurate, 0.4× speedup?

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

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

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

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

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


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

    1. Initial program 98.8%

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

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

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

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

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

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

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

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

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

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

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

      if -4.99999999999999963e74 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000003e40

      1. Initial program 99.7%

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

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

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

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

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

    Alternative 5: 58.7% accurate, 0.4× speedup?

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

      1. Initial program 98.8%

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

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

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

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

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

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

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

      if -4.99999999999999963e74 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000003e40

      1. Initial program 99.7%

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

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

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

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

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

    Alternative 6: 53.1% accurate, 0.4× speedup?

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

      1. Initial program 98.7%

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

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

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

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

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

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

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

        \[\leadsto \frac{x}{z} \cdot 60 \]
      7. Step-by-step derivation
        1. lower-/.f6441.1

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

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

      if -5.0000000000000004e171 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1.00000000000000003e40

      1. Initial program 99.7%

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

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

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

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

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

    Alternative 7: 61.7% accurate, 0.8× speedup?

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

      1. Initial program 99.1%

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

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

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

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

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

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

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

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

        \[\leadsto -60 \cdot \frac{x}{t} + \color{blue}{120 \cdot a} \]
      7. 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. lift-*.f6468.2

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

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

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

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

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

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

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

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

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

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

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

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

      if -2.8e-110 < t < 1.5199999999999999e-131

      1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

        if 1.5199999999999999e-131 < t < 3.6000000000000002e-42

        1. Initial program 99.8%

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

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

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

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

      Alternative 8: 61.7% accurate, 0.8× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(-60, \frac{x}{t}, 120 \cdot a\right)\\ \mathbf{if}\;t \leq -2.8 \cdot 10^{-110}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t \leq 1.52 \cdot 10^{-131}:\\ \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z}\\ \mathbf{elif}\;t \leq 3.6 \cdot 10^{-42}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
      (FPCore (x y z t a)
       :precision binary64
       (let* ((t_1 (fma -60.0 (/ x t) (* 120.0 a))))
         (if (<= t -2.8e-110)
           t_1
           (if (<= t 1.52e-131)
             (/ (* (- x y) 60.0) z)
             (if (<= t 3.6e-42) (* 120.0 a) t_1)))))
      double code(double x, double y, double z, double t, double a) {
      	double t_1 = fma(-60.0, (x / t), (120.0 * a));
      	double tmp;
      	if (t <= -2.8e-110) {
      		tmp = t_1;
      	} else if (t <= 1.52e-131) {
      		tmp = ((x - y) * 60.0) / z;
      	} else if (t <= 3.6e-42) {
      		tmp = 120.0 * a;
      	} else {
      		tmp = t_1;
      	}
      	return tmp;
      }
      
      function code(x, y, z, t, a)
      	t_1 = fma(-60.0, Float64(x / t), Float64(120.0 * a))
      	tmp = 0.0
      	if (t <= -2.8e-110)
      		tmp = t_1;
      	elseif (t <= 1.52e-131)
      		tmp = Float64(Float64(Float64(x - y) * 60.0) / z);
      	elseif (t <= 3.6e-42)
      		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[(x / t), $MachinePrecision] + N[(120.0 * a), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t, -2.8e-110], t$95$1, If[LessEqual[t, 1.52e-131], N[(N[(N[(x - y), $MachinePrecision] * 60.0), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t, 3.6e-42], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \mathsf{fma}\left(-60, \frac{x}{t}, 120 \cdot a\right)\\
      \mathbf{if}\;t \leq -2.8 \cdot 10^{-110}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t \leq 1.52 \cdot 10^{-131}:\\
      \;\;\;\;\frac{\left(x - y\right) \cdot 60}{z}\\
      
      \mathbf{elif}\;t \leq 3.6 \cdot 10^{-42}:\\
      \;\;\;\;120 \cdot a\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_1\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if t < -2.8e-110 or 3.6000000000000002e-42 < t

        1. Initial program 99.1%

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

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

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

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

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

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

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

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

          \[\leadsto -60 \cdot \frac{x}{t} + \color{blue}{120 \cdot a} \]
        7. 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. lift-*.f6468.2

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

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

        if -2.8e-110 < t < 1.5199999999999999e-131

        1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

          if 1.5199999999999999e-131 < t < 3.6000000000000002e-42

          1. Initial program 99.8%

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

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

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

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

        Alternative 9: 89.0% accurate, 0.8× speedup?

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

          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            \[\leadsto \mathsf{fma}\left(a, 120, \frac{\color{blue}{-60 \cdot y}}{z - t}\right) \]
          9. Step-by-step derivation
            1. lower-*.f6489.8

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

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

          if -4.7999999999999997e98 < y < 2.00000000000000004e95

          1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

        Alternative 10: 82.6% accurate, 0.8× speedup?

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

          1. Initial program 99.7%

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

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

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

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

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

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

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

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

          if -2.40000000000000009e-119 < a < 1.30000000000000002e-173

          1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 11: 76.5% accurate, 0.8× speedup?

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

          1. Initial program 99.7%

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

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

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

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

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

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

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

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

            \[\leadsto -60 \cdot \frac{x}{t} + \color{blue}{120 \cdot a} \]
          7. 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. lift-*.f6471.7

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(a, 120, \frac{x}{t} \cdot -60\right) \]
            9. lift-/.f6471.7

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

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

          if -1.3e20 < t < 1.6499999999999999e60

          1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(x - y, \frac{60}{z}, 120 \cdot a\right) \]
          13. Recombined 2 regimes into one program.
          14. Final simplification79.9%

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

          Alternative 12: 81.5% accurate, 0.8× speedup?

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

            1. Initial program 99.7%

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

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

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

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

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

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

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

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

            if -1.55000000000000004e-110 < t < 2.60000000000000011e56

            1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 2.60000000000000011e56 < t

            1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 13: 81.5% accurate, 0.8× speedup?

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

            1. Initial program 99.7%

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

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

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

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

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

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

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

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

            if -1.55000000000000004e-110 < t < 2.60000000000000011e56

            1. Initial program 99.0%

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

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

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

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

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

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

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

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

            if 2.60000000000000011e56 < t

            1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 14: 81.5% accurate, 0.8× speedup?

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

            1. Initial program 99.7%

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

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

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

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

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

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

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

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

            if -1.55000000000000004e-110 < t < 2.60000000000000011e56

            1. Initial program 99.0%

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

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

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

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

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

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

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

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

            if 2.60000000000000011e56 < t

            1. Initial program 99.7%

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

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

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

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

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

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

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

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

          Alternative 15: 81.5% accurate, 0.8× speedup?

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

            1. Initial program 99.7%

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

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

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

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

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

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

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

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

            if -1.55000000000000004e-110 < t < 2.60000000000000011e56

            1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 2.60000000000000011e56 < t

              1. Initial program 99.7%

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

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

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

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

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

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

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

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

            Alternative 16: 73.5% accurate, 0.9× speedup?

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

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                if -35 < a < 5.2e9

                1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 17: 74.3% accurate, 0.9× speedup?

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

                1. Initial program 99.9%

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

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

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

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

                if -5.2000000000000004e77 < a < 5.2e9

                1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 18: 73.4% accurate, 0.9× speedup?

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

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -35 < a < 2.3999999999999999e-45

                  1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 2.3999999999999999e-45 < a

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 19: 73.4% accurate, 0.9× speedup?

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

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                    if -35 < a < 2.3999999999999999e-45

                    1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 2.3999999999999999e-45 < a

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 20: 52.9% accurate, 1.1× speedup?

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

                    1. Initial program 99.8%

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

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

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

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

                    if -1.2e-155 < a < 3.2999999999999999e-193

                    1. Initial program 98.3%

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

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

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

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

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

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

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

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

                      \[\leadsto -60 \cdot \frac{x}{t} + \color{blue}{120 \cdot a} \]
                    7. 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. lift-*.f6437.0

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

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

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

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

                        \[\leadsto \frac{x}{t} \cdot -60 \]
                      3. lift-/.f6435.7

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

                      \[\leadsto \frac{x}{t} \cdot -60 \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification52.8%

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

                  Alternative 21: 52.7% accurate, 1.1× speedup?

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

                    1. Initial program 99.8%

                      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                    2. Add Preprocessing
                    3. Taylor expanded in z around inf

                      \[\leadsto \color{blue}{120 \cdot a} \]
                    4. Step-by-step derivation
                      1. lower-*.f6460.4

                        \[\leadsto 120 \cdot \color{blue}{a} \]
                    5. Applied rewrites60.4%

                      \[\leadsto \color{blue}{120 \cdot a} \]

                    if -2.3000000000000001e-140 < a < 1.50000000000000008e-188

                    1. Initial program 98.4%

                      \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                    2. Add Preprocessing
                    3. Taylor expanded in y around inf

                      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
                    4. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \frac{y}{z - t} \cdot \color{blue}{-60} \]
                      2. lower-*.f64N/A

                        \[\leadsto \frac{y}{z - t} \cdot \color{blue}{-60} \]
                      3. lower-/.f64N/A

                        \[\leadsto \frac{y}{z - t} \cdot -60 \]
                      4. lift--.f6443.8

                        \[\leadsto \frac{y}{z - t} \cdot -60 \]
                    5. Applied rewrites43.8%

                      \[\leadsto \color{blue}{\frac{y}{z - t} \cdot -60} \]
                    6. Taylor expanded in z around 0

                      \[\leadsto 60 \cdot \color{blue}{\frac{y}{t}} \]
                    7. Step-by-step derivation
                      1. *-commutativeN/A

                        \[\leadsto \frac{y}{t} \cdot 60 \]
                      2. lower-*.f64N/A

                        \[\leadsto \frac{y}{t} \cdot 60 \]
                      3. lower-/.f6428.4

                        \[\leadsto \frac{y}{t} \cdot 60 \]
                    8. Applied rewrites28.4%

                      \[\leadsto \frac{y}{t} \cdot \color{blue}{60} \]
                  3. Recombined 2 regimes into one program.
                  4. Final simplification51.4%

                    \[\leadsto \begin{array}{l} \mathbf{if}\;a \leq -2.3 \cdot 10^{-140} \lor \neg \left(a \leq 1.5 \cdot 10^{-188}\right):\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{y}{t} \cdot 60\\ \end{array} \]
                  5. Add Preprocessing

                  Alternative 22: 50.6% accurate, 5.2× speedup?

                  \[\begin{array}{l} \\ 120 \cdot a \end{array} \]
                  (FPCore (x y z t a) :precision binary64 (* 120.0 a))
                  double code(double x, double y, double z, double t, double a) {
                  	return 120.0 * a;
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      code = 120.0d0 * a
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a) {
                  	return 120.0 * a;
                  }
                  
                  def code(x, y, z, t, a):
                  	return 120.0 * a
                  
                  function code(x, y, z, t, a)
                  	return Float64(120.0 * a)
                  end
                  
                  function tmp = code(x, y, z, t, a)
                  	tmp = 120.0 * a;
                  end
                  
                  code[x_, y_, z_, t_, a_] := N[(120.0 * a), $MachinePrecision]
                  
                  \begin{array}{l}
                  
                  \\
                  120 \cdot a
                  \end{array}
                  
                  Derivation
                  1. Initial program 99.4%

                    \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                  2. Add Preprocessing
                  3. Taylor expanded in z around inf

                    \[\leadsto \color{blue}{120 \cdot a} \]
                  4. Step-by-step derivation
                    1. lower-*.f6446.1

                      \[\leadsto 120 \cdot \color{blue}{a} \]
                  5. Applied rewrites46.1%

                    \[\leadsto \color{blue}{120 \cdot a} \]
                  6. Add Preprocessing

                  Developer Target 1: 99.8% accurate, 0.8× speedup?

                  \[\begin{array}{l} \\ \frac{60}{\frac{z - t}{x - y}} + a \cdot 120 \end{array} \]
                  (FPCore (x y z t a)
                   :precision binary64
                   (+ (/ 60.0 (/ (- z t) (- x y))) (* a 120.0)))
                  double code(double x, double y, double z, double t, double a) {
                  	return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
                  }
                  
                  module fmin_fmax_functions
                      implicit none
                      private
                      public fmax
                      public fmin
                  
                      interface fmax
                          module procedure fmax88
                          module procedure fmax44
                          module procedure fmax84
                          module procedure fmax48
                      end interface
                      interface fmin
                          module procedure fmin88
                          module procedure fmin44
                          module procedure fmin84
                          module procedure fmin48
                      end interface
                  contains
                      real(8) function fmax88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmax44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmax84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmax48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                      end function
                      real(8) function fmin88(x, y) result (res)
                          real(8), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(4) function fmin44(x, y) result (res)
                          real(4), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                      end function
                      real(8) function fmin84(x, y) result(res)
                          real(8), intent (in) :: x
                          real(4), intent (in) :: y
                          res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                      end function
                      real(8) function fmin48(x, y) result(res)
                          real(4), intent (in) :: x
                          real(8), intent (in) :: y
                          res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                      end function
                  end module
                  
                  real(8) function code(x, y, z, t, a)
                  use fmin_fmax_functions
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      real(8), intent (in) :: z
                      real(8), intent (in) :: t
                      real(8), intent (in) :: a
                      code = (60.0d0 / ((z - t) / (x - y))) + (a * 120.0d0)
                  end function
                  
                  public static double code(double x, double y, double z, double t, double a) {
                  	return (60.0 / ((z - t) / (x - y))) + (a * 120.0);
                  }
                  
                  def code(x, y, z, t, a):
                  	return (60.0 / ((z - t) / (x - y))) + (a * 120.0)
                  
                  function code(x, y, z, t, a)
                  	return Float64(Float64(60.0 / Float64(Float64(z - t) / Float64(x - y))) + Float64(a * 120.0))
                  end
                  
                  function tmp = code(x, y, z, t, a)
                  	tmp = (60.0 / ((z - t) / (x - y))) + (a * 120.0);
                  end
                  
                  code[x_, y_, z_, t_, a_] := N[(N[(60.0 / N[(N[(z - t), $MachinePrecision] / N[(x - y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
                  
                  \begin{array}{l}
                  
                  \\
                  \frac{60}{\frac{z - t}{x - y}} + a \cdot 120
                  \end{array}
                  

                  Reproduce

                  ?
                  herbie shell --seed 2025051 
                  (FPCore (x y z t a)
                    :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
                    :precision binary64
                  
                    :alt
                    (! :herbie-platform default (+ (/ 60 (/ (- z t) (- x y))) (* a 120)))
                  
                    (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))