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

Percentage Accurate: 99.3% → 99.4%
Time: 4.8s
Alternatives: 20
Speedup: 1.0×

Specification

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

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 20 alternatives:

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

Initial Program: 99.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.4% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

      \[\leadsto \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) \]
  3. Applied rewrites99.4%

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

Alternative 2: 84.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -1.78 \cdot 10^{+19}:\\
\;\;\;\;\frac{60 \cdot \left(x - y\right)}{z} + a \cdot 120\\

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

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(a, 120, \frac{x - y}{z} \cdot 60\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.78e19

    1. Initial program 99.0%

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

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

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

      if -1.78e19 < z < 6.39999999999999975e-22

      1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.39999999999999975e-22 < z

      1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 3: 84.5% accurate, 0.8× speedup?

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

      1. Initial program 99.0%

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

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

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

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

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

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

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

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

      if -1.65e19 < z < 6.39999999999999975e-22

      1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.39999999999999975e-22 < z

      1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 4: 84.5% accurate, 0.8× speedup?

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

      1. Initial program 99.1%

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

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

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

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

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

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

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

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

      if -1.65e19 < z < 6.39999999999999975e-22

      1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 5: 84.4% accurate, 0.8× speedup?

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

      1. Initial program 99.1%

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

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

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

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

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

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

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

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

      if -1.65e19 < z < 6.39999999999999975e-22

      1. Initial program 99.6%

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

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

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

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

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

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

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

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

    Alternative 6: 77.9% accurate, 0.8× speedup?

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

      1. Initial program 98.9%

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

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

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

          \[\leadsto \frac{60 \cdot \color{blue}{\left(-1 \cdot y\right)}}{z} + a \cdot 120 \]
        3. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \frac{60 \cdot \left(\mathsf{neg}\left(y\right)\right)}{z} + a \cdot 120 \]
          2. lower-neg.f6475.3

            \[\leadsto \frac{60 \cdot \left(-y\right)}{z} + a \cdot 120 \]
        4. Applied rewrites75.3%

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

        if -7.6e20 < z < 5.49999999999999974e40

        1. Initial program 99.5%

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

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

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

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

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

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

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

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

        if 5.49999999999999974e40 < z

        1. Initial program 99.3%

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

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

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

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

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

          Alternative 7: 73.3% accurate, 0.9× speedup?

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

            1. Initial program 99.5%

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

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

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

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

            if -3.9999999999999997e-71 < a < 1.14999999999999996e-66

            1. Initial program 99.2%

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

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

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

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

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

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

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

                \[\leadsto \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) \]
            3. Applied rewrites99.2%

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

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

                \[\leadsto \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--.f6479.8

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

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

            if 1.14999999999999996e-66 < a

            1. Initial program 99.4%

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

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

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

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

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

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

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

                \[\leadsto \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) \]
            3. Applied rewrites99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 8: 67.9% accurate, 0.8× speedup?

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

            1. Initial program 99.0%

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

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

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

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

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

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

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

                \[\leadsto \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) \]
            3. Applied rewrites99.0%

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(a, 120, -60 \cdot \color{blue}{\frac{y}{z}}\right) \]
            8. 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-/.f6476.8

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

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

            if -3.39999999999999975e42 < z < 5e-256

            1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if 5e-256 < z < 2.64999999999999989e39

            1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 2.64999999999999989e39 < z

              1. Initial program 99.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 9: 67.9% accurate, 0.8× speedup?

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

                1. Initial program 99.1%

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

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

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

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

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

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

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

                    \[\leadsto \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) \]
                3. Applied rewrites99.2%

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

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

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

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

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

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

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

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

                  \[\leadsto \mathsf{fma}\left(a, 120, -60 \cdot \color{blue}{\frac{y}{z}}\right) \]
                8. 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-/.f6474.8

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

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

                if -3.39999999999999975e42 < z < 5e-256

                1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 5e-256 < z < 2.05000000000000003e-16

                1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 10: 67.5% accurate, 0.8× speedup?

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

                  1. Initial program 99.1%

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

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

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

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

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

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

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

                      \[\leadsto \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) \]
                  3. Applied rewrites99.2%

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

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

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

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

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

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

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

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

                    \[\leadsto \mathsf{fma}\left(a, 120, -60 \cdot \color{blue}{\frac{y}{z}}\right) \]
                  8. 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-/.f6474.8

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

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

                  if -3.39999999999999975e42 < z < 5e-256

                  1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if 5e-256 < z < 2.05000000000000003e-16

                  1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

                  Alternative 11: 61.7% accurate, 0.9× speedup?

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

                    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{x \cdot 60}{\color{blue}{z} - t} \]
                      9. lift--.f6458.4

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

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

                    if -1.42000000000000005e122 < x < 4.4e217

                    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 4.4e217 < x

                    1. Initial program 98.2%

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

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

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

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

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

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

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

                  Alternative 12: 61.7% accurate, 0.9× speedup?

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

                    1. Initial program 98.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        \[\leadsto \frac{x \cdot 60}{\color{blue}{z} - t} \]
                      9. lift--.f6458.4

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

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

                    if -1.42000000000000005e122 < x < 4.4e217

                    1. Initial program 99.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if 4.4e217 < x

                    1. Initial program 98.2%

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

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

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

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

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

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

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

                  Alternative 13: 60.5% accurate, 0.9× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq -2.1 \cdot 10^{-163}:\\ \;\;\;\;120 \cdot a\\ \mathbf{elif}\;a \leq 2.15 \cdot 10^{-160}:\\ \;\;\;\;\frac{y}{z - t} \cdot -60\\ \mathbf{elif}\;a \leq 7 \cdot 10^{-67}:\\ \;\;\;\;\frac{x}{z - t} \cdot 60\\ \mathbf{else}:\\ \;\;\;\;120 \cdot a\\ \end{array} \end{array} \]
                  (FPCore (x y z t a)
                   :precision binary64
                   (if (<= a -2.1e-163)
                     (* 120.0 a)
                     (if (<= a 2.15e-160)
                       (* (/ y (- z t)) -60.0)
                       (if (<= a 7e-67) (* (/ x (- z t)) 60.0) (* 120.0 a)))))
                  double code(double x, double y, double z, double t, double a) {
                  	double tmp;
                  	if (a <= -2.1e-163) {
                  		tmp = 120.0 * a;
                  	} else if (a <= 2.15e-160) {
                  		tmp = (y / (z - t)) * -60.0;
                  	} else if (a <= 7e-67) {
                  		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) :: tmp
                      if (a <= (-2.1d-163)) then
                          tmp = 120.0d0 * a
                      else if (a <= 2.15d-160) then
                          tmp = (y / (z - t)) * (-60.0d0)
                      else if (a <= 7d-67) 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 tmp;
                  	if (a <= -2.1e-163) {
                  		tmp = 120.0 * a;
                  	} else if (a <= 2.15e-160) {
                  		tmp = (y / (z - t)) * -60.0;
                  	} else if (a <= 7e-67) {
                  		tmp = (x / (z - t)) * 60.0;
                  	} else {
                  		tmp = 120.0 * a;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a):
                  	tmp = 0
                  	if a <= -2.1e-163:
                  		tmp = 120.0 * a
                  	elif a <= 2.15e-160:
                  		tmp = (y / (z - t)) * -60.0
                  	elif a <= 7e-67:
                  		tmp = (x / (z - t)) * 60.0
                  	else:
                  		tmp = 120.0 * a
                  	return tmp
                  
                  function code(x, y, z, t, a)
                  	tmp = 0.0
                  	if (a <= -2.1e-163)
                  		tmp = Float64(120.0 * a);
                  	elseif (a <= 2.15e-160)
                  		tmp = Float64(Float64(y / Float64(z - t)) * -60.0);
                  	elseif (a <= 7e-67)
                  		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)
                  	tmp = 0.0;
                  	if (a <= -2.1e-163)
                  		tmp = 120.0 * a;
                  	elseif (a <= 2.15e-160)
                  		tmp = (y / (z - t)) * -60.0;
                  	elseif (a <= 7e-67)
                  		tmp = (x / (z - t)) * 60.0;
                  	else
                  		tmp = 120.0 * a;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_] := If[LessEqual[a, -2.1e-163], N[(120.0 * a), $MachinePrecision], If[LessEqual[a, 2.15e-160], N[(N[(y / N[(z - t), $MachinePrecision]), $MachinePrecision] * -60.0), $MachinePrecision], If[LessEqual[a, 7e-67], N[(N[(x / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision], N[(120.0 * a), $MachinePrecision]]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;a \leq -2.1 \cdot 10^{-163}:\\
                  \;\;\;\;120 \cdot a\\
                  
                  \mathbf{elif}\;a \leq 2.15 \cdot 10^{-160}:\\
                  \;\;\;\;\frac{y}{z - t} \cdot -60\\
                  
                  \mathbf{elif}\;a \leq 7 \cdot 10^{-67}:\\
                  \;\;\;\;\frac{x}{z - t} \cdot 60\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;120 \cdot a\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if a < -2.09999999999999998e-163 or 7.0000000000000001e-67 < a

                    1. Initial program 99.4%

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

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

                        \[\leadsto 120 \cdot \color{blue}{a} \]
                    4. Applied rewrites65.2%

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

                    if -2.09999999999999998e-163 < a < 2.15000000000000007e-160

                    1. Initial program 99.2%

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

                      \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
                    3. 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--.f6444.9

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

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

                    if 2.15000000000000007e-160 < a < 7.0000000000000001e-67

                    1. Initial program 99.0%

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

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

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

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

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

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

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

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

                    1. Initial program 98.3%

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

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

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

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

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

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

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

                    if -5.00000000000000008e99 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 3.99999999999999978e72

                    1. Initial program 99.8%

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

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

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

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

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

                    1. Initial program 98.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 15: 58.7% accurate, 1.0× speedup?

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

                    1. Initial program 99.4%

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

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

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

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

                    if -2.99999999999999991e-168 < a < 2.6000000000000002e-69

                    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 16: 54.4% accurate, 1.2× speedup?

                  \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;x \leq -3.6 \cdot 10^{+255}:\\ \;\;\;\;\frac{x}{z} \cdot 60\\ \mathbf{elif}\;x \leq 1.55 \cdot 10^{+240}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;\frac{x}{t} \cdot -60\\ \end{array} \end{array} \]
                  (FPCore (x y z t a)
                   :precision binary64
                   (if (<= x -3.6e+255)
                     (* (/ x z) 60.0)
                     (if (<= x 1.55e+240) (* 120.0 a) (* (/ x t) -60.0))))
                  double code(double x, double y, double z, double t, double a) {
                  	double tmp;
                  	if (x <= -3.6e+255) {
                  		tmp = (x / z) * 60.0;
                  	} else if (x <= 1.55e+240) {
                  		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 (x <= (-3.6d+255)) then
                          tmp = (x / z) * 60.0d0
                      else if (x <= 1.55d+240) 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 (x <= -3.6e+255) {
                  		tmp = (x / z) * 60.0;
                  	} else if (x <= 1.55e+240) {
                  		tmp = 120.0 * a;
                  	} else {
                  		tmp = (x / t) * -60.0;
                  	}
                  	return tmp;
                  }
                  
                  def code(x, y, z, t, a):
                  	tmp = 0
                  	if x <= -3.6e+255:
                  		tmp = (x / z) * 60.0
                  	elif x <= 1.55e+240:
                  		tmp = 120.0 * a
                  	else:
                  		tmp = (x / t) * -60.0
                  	return tmp
                  
                  function code(x, y, z, t, a)
                  	tmp = 0.0
                  	if (x <= -3.6e+255)
                  		tmp = Float64(Float64(x / z) * 60.0);
                  	elseif (x <= 1.55e+240)
                  		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 (x <= -3.6e+255)
                  		tmp = (x / z) * 60.0;
                  	elseif (x <= 1.55e+240)
                  		tmp = 120.0 * a;
                  	else
                  		tmp = (x / t) * -60.0;
                  	end
                  	tmp_2 = tmp;
                  end
                  
                  code[x_, y_, z_, t_, a_] := If[LessEqual[x, -3.6e+255], N[(N[(x / z), $MachinePrecision] * 60.0), $MachinePrecision], If[LessEqual[x, 1.55e+240], N[(120.0 * a), $MachinePrecision], N[(N[(x / t), $MachinePrecision] * -60.0), $MachinePrecision]]]
                  
                  \begin{array}{l}
                  
                  \\
                  \begin{array}{l}
                  \mathbf{if}\;x \leq -3.6 \cdot 10^{+255}:\\
                  \;\;\;\;\frac{x}{z} \cdot 60\\
                  
                  \mathbf{elif}\;x \leq 1.55 \cdot 10^{+240}:\\
                  \;\;\;\;120 \cdot a\\
                  
                  \mathbf{else}:\\
                  \;\;\;\;\frac{x}{t} \cdot -60\\
                  
                  
                  \end{array}
                  \end{array}
                  
                  Derivation
                  1. Split input into 3 regimes
                  2. if x < -3.5999999999999999e255

                    1. Initial program 97.2%

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

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

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

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

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

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

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

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

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

                      if -3.5999999999999999e255 < x < 1.55e240

                      1. Initial program 99.5%

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

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

                          \[\leadsto 120 \cdot \color{blue}{a} \]
                      4. Applied rewrites54.3%

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

                      if 1.55e240 < x

                      1. Initial program 97.7%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{x}{t} \cdot -60 \]
                        3. lower-/.f6440.3

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

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

                    Alternative 17: 54.4% accurate, 0.5× speedup?

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

                      1. Initial program 96.1%

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

                        \[\leadsto \color{blue}{-60 \cdot \frac{y}{z - t}} \]
                      3. 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--.f6451.3

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

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

                        \[\leadsto \frac{y}{z} \cdot -60 \]
                      6. Step-by-step derivation
                        1. lower-/.f6434.9

                          \[\leadsto \frac{y}{z} \cdot -60 \]
                      7. Applied rewrites34.9%

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

                      if -1e256 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e114

                      1. Initial program 99.8%

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

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

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

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

                      if 2e114 < (/.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. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{x}{t} \cdot -60 \]
                        3. lower-/.f6425.1

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

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

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

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

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

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

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

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

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

                    Alternative 18: 54.4% accurate, 0.5× speedup?

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

                      1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{x}{t} \cdot -60 \]
                        3. lower-/.f6441.7

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

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

                      if -9.9999999999999996e290 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e114

                      1. Initial program 99.8%

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

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

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

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

                      if 2e114 < (/.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. Taylor expanded in z around 0

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{x}{t} \cdot -60 \]
                        3. lower-/.f6425.1

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

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

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

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

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

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

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

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

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

                    Alternative 19: 53.0% accurate, 0.5× speedup?

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

                      1. Initial program 97.5%

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto \frac{x}{t} \cdot -60 \]
                        3. lower-/.f6429.1

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

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

                      if -9.9999999999999996e290 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 2e114

                      1. Initial program 99.8%

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

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

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

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

                    Alternative 20: 51.3% accurate, 4.6× speedup?

                    \[\begin{array}{l} \\ 120 \cdot a \end{array} \]
                    (FPCore (x y z t a) :precision binary64 (* 120.0 a))
                    double code(double x, double y, double z, double t, double a) {
                    	return 120.0 * a;
                    }
                    
                    module fmin_fmax_functions
                        implicit none
                        private
                        public fmax
                        public fmin
                    
                        interface fmax
                            module procedure fmax88
                            module procedure fmax44
                            module procedure fmax84
                            module procedure fmax48
                        end interface
                        interface fmin
                            module procedure fmin88
                            module procedure fmin44
                            module procedure fmin84
                            module procedure fmin48
                        end interface
                    contains
                        real(8) function fmax88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmax44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmax84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmax48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                        end function
                        real(8) function fmin88(x, y) result (res)
                            real(8), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(4) function fmin44(x, y) result (res)
                            real(4), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                        end function
                        real(8) function fmin84(x, y) result(res)
                            real(8), intent (in) :: x
                            real(4), intent (in) :: y
                            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                        end function
                        real(8) function fmin48(x, y) result(res)
                            real(4), intent (in) :: x
                            real(8), intent (in) :: y
                            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                        end function
                    end module
                    
                    real(8) function code(x, y, z, t, a)
                    use fmin_fmax_functions
                        real(8), intent (in) :: x
                        real(8), intent (in) :: y
                        real(8), intent (in) :: z
                        real(8), intent (in) :: t
                        real(8), intent (in) :: a
                        code = 120.0d0 * a
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a) {
                    	return 120.0 * a;
                    }
                    
                    def code(x, y, z, t, a):
                    	return 120.0 * a
                    
                    function code(x, y, z, t, a)
                    	return Float64(120.0 * a)
                    end
                    
                    function tmp = code(x, y, z, t, a)
                    	tmp = 120.0 * a;
                    end
                    
                    code[x_, y_, z_, t_, a_] := N[(120.0 * a), $MachinePrecision]
                    
                    \begin{array}{l}
                    
                    \\
                    120 \cdot a
                    \end{array}
                    
                    Derivation
                    1. Initial program 99.3%

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

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

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

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

                    Reproduce

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