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

Percentage Accurate: 99.2% → 99.3%
Time: 9.3s
Alternatives: 18
Speedup: 1.1×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 99.2% accurate, 1.0× speedup?

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

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

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

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

Alternative 1: 99.3% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.99999999999999984e134 or 9.999999999999999e201 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

    1. Initial program 99.7%

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

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

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

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

        \[\leadsto \color{blue}{\frac{x}{z - t}} \cdot 60 \]
      4. lower--.f6455.8

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

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

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

        \[\leadsto \frac{x}{z} \cdot 60 \]
      2. Taylor expanded in z around 0

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

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

        if -1.99999999999999984e134 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 9.999999999999999e201

        1. Initial program 99.8%

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

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

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

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

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

      Alternative 3: 58.8% accurate, 0.7× speedup?

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

        1. Initial program 99.9%

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

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

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

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

        if -4.4999999999999999e-45 < a < -8.19999999999999965e-188

        1. Initial program 99.7%

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

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

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

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

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

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

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

        if -8.19999999999999965e-188 < a < 1.7e-245

        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if 1.7e-245 < a < 6.4000000000000002e-12

          1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 4: 59.1% accurate, 0.7× speedup?

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

            1. Initial program 99.9%

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

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

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

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

            if -9.50000000000000025e-102 < a < -2.30000000000000011e-143 or 1.7e-245 < a < 6.4000000000000002e-12

            1. Initial program 99.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -2.30000000000000011e-143 < a < 1.7e-245

              1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 5: 89.3% accurate, 0.8× speedup?

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

                1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

                if -1.9499999999999999e37 < y < 3.3999999999999998e50

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 3.3999999999999998e50 < y

                1. Initial program 99.8%

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

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

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

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

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

              Alternative 6: 89.5% accurate, 0.8× speedup?

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

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

                if -1.9499999999999999e37 < y < 3.3999999999999998e50

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 7: 83.9% accurate, 0.8× speedup?

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

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -2.5000000000000002e-6 < t < 7.9999999999999994e-77

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

              Alternative 8: 83.8% accurate, 0.8× speedup?

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

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

                if -2.5000000000000002e-6 < t < 7.9999999999999994e-77

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

              Alternative 9: 83.1% accurate, 0.8× speedup?

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

                1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

                if -4.4999999999999999e-45 < a < 1.56000000000000002e-12

                1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 10: 83.8% accurate, 0.8× speedup?

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

                1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -2.5000000000000002e-6 < t < 7.9999999999999994e-77

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 7.9999999999999994e-77 < t

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                Alternative 11: 83.7% accurate, 0.8× speedup?

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

                  1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  if -2.5000000000000002e-6 < t < 7.9999999999999994e-77

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

                  if 7.9999999999999994e-77 < t

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 12: 75.3% accurate, 0.9× speedup?

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

                    1. Initial program 99.9%

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

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

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

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

                    if -8.19999999999999984e-44 < a < 9e19

                    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  Alternative 13: 74.5% accurate, 0.9× speedup?

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

                    1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

                      if -3e-32 < a < 9e19

                      1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                      if 9e19 < a

                      1. Initial program 99.9%

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

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

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

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

                    Alternative 14: 74.2% accurate, 0.9× speedup?

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

                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

                        if -3e-32 < a < 9e19

                        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        if 9e19 < a

                        1. Initial program 99.9%

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

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

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

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

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

                      Alternative 15: 58.4% accurate, 1.0× speedup?

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

                        1. Initial program 99.9%

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

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

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

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

                        if -1.84999999999999993e-146 < a < 4.6000000000000002e-169

                        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                        Alternative 16: 52.3% accurate, 1.1× speedup?

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

                          1. Initial program 99.6%

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

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

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

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

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

                              \[\leadsto \frac{x}{\color{blue}{z - t}} \cdot 60 \]
                          5. Applied rewrites70.9%

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

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

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

                            if -9.39999999999999966e182 < x < 1.19999999999999999e171

                            1. Initial program 99.8%

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

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

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

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

                            if 1.19999999999999999e171 < x

                            1. Initial program 99.7%

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

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

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

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

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

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

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

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

                                \[\leadsto \frac{x}{z} \cdot 60 \]
                              2. Taylor expanded in z around 0

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

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

                              Alternative 17: 99.8% accurate, 1.1× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              Alternative 18: 50.7% accurate, 5.2× speedup?

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

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

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

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

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

                              Developer Target 1: 99.7% accurate, 0.8× speedup?

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

                              Reproduce

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