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

Percentage Accurate: 99.4% → 99.8%
Time: 4.7s
Alternatives: 19
Speedup: 1.0×

Specification

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

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 99.4% accurate, 1.0× speedup?

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

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 90.0% accurate, 0.8× speedup?

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

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

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -1.8e62 or 1.10000000000000003e38 < y

    1. Initial program 99.4%

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

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

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

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

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

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

        \[\leadsto \color{blue}{a \cdot 120} + \frac{-60 \cdot y}{z - t} \]
      4. lower-fma.f6474.9%

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

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

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

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

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

    if -1.8e62 < y < 1.10000000000000003e38

    1. Initial program 99.4%

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

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

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

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

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

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

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

Alternative 3: 82.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 7.8 \cdot 10^{-44}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\

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

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


\end{array}
Derivation
  1. Split input into 5 regimes
  2. if t < -2.6199999999999999e-126

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.6199999999999999e-126 < t < 1.8999999999999999e-93

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8999999999999999e-93 < t < 7.8000000000000004e-44

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.8000000000000004e-44 < t < 1.0500000000000001e109

    1. Initial program 99.4%

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

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

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

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

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

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

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

    if 1.0500000000000001e109 < t

    1. Initial program 99.4%

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

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

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

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

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

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

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

Alternative 4: 82.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 7.8 \cdot 10^{-44}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\

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

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.6199999999999999e-126 or 1.0500000000000001e109 < t

    1. Initial program 99.4%

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

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

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

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

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

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

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

    if -2.6199999999999999e-126 < t < 1.8999999999999999e-93

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8999999999999999e-93 < t < 7.8000000000000004e-44

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.8000000000000004e-44 < t < 1.0500000000000001e109

    1. Initial program 99.4%

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

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

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

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

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

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

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

Alternative 5: 82.2% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 7.8 \cdot 10^{-44}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\

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

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.6199999999999999e-126 or 1.0500000000000001e109 < t

    1. Initial program 99.4%

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

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

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

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

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

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

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

    if -2.6199999999999999e-126 < t < 1.8999999999999999e-93

    1. Initial program 99.4%

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

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

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

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

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

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

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

    if 1.8999999999999999e-93 < t < 7.8000000000000004e-44

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 7.8000000000000004e-44 < t < 1.0500000000000001e109

    1. Initial program 99.4%

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

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

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

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

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

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

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

Alternative 6: 79.7% accurate, 0.4× speedup?

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

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

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


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

    1. Initial program 99.4%

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

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

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

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

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

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

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

    if -5.00000000000000031e-10 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999954e-22

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 7: 72.6% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t \leq 1.04 \cdot 10^{-32}:\\
\;\;\;\;\frac{60}{z - t} \cdot \left(x - y\right)\\

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

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if t < -2.6199999999999999e-126 or 2.90000000000000007e56 < t

    1. Initial program 99.4%

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

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

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

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

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

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

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

    if -2.6199999999999999e-126 < t < -4.6000000000000004e-233

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

    if -4.6000000000000004e-233 < t < 1.03999999999999998e-32

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.03999999999999998e-32 < t < 2.90000000000000007e56

    1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 8: 72.5% accurate, 0.8× speedup?

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

      1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        if -9.5999999999999994e78 < a < 1.44999999999999986e-70

        1. Initial program 99.4%

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

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

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

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

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

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

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

        if 2.49999999999999996e72 < a

        1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 9: 66.5% accurate, 0.8× speedup?

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

          1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

            if -4.49999999999999973e-147 < t < 3.29999999999999999e-196

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

            if 3.29999999999999999e-196 < t < 2.90000000000000007e56

            1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if 2.90000000000000007e56 < t

              1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 10: 65.4% accurate, 0.7× speedup?

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

              1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -2.6199999999999999e-126 < t < 1.8999999999999999e-93 or 7.8000000000000004e-44 < t < 2.90000000000000007e56

              1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

              if 1.8999999999999999e-93 < t < 7.8000000000000004e-44

              1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto -60 \cdot \frac{y}{z - \color{blue}{t}} \]
                3. lower--.f6426.0%

                  \[\leadsto -60 \cdot \frac{y}{z - t} \]
              13. Applied rewrites26.0%

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

              if 2.90000000000000007e56 < t

              1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

            Alternative 11: 63.1% accurate, 0.9× speedup?

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

              1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              if -2.6199999999999999e-126 < t < 2.90000000000000007e56

              1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if 2.90000000000000007e56 < t

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 12: 60.9% accurate, 0.9× speedup?

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

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                if -7.00000000000000002e-139 < t < 1.7e8

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

                if 1.7e8 < t

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 13: 60.8% accurate, 0.9× speedup?

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

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

                if -7.00000000000000002e-139 < t < 1.7e8

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

              Alternative 14: 55.8% accurate, 0.4× speedup?

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

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto -60 \cdot \frac{y}{z - \color{blue}{t}} \]
                  3. lower--.f6426.0%

                    \[\leadsto -60 \cdot \frac{y}{z - t} \]
                13. Applied rewrites26.0%

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

                if -5.00000000000000031e-10 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999954e-22

                1. Initial program 99.4%

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

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

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

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

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

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto \frac{x - y}{t} \cdot -60 \]
                  5. mult-flipN/A

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

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

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

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

                    \[\leadsto \left(\frac{\mathsf{neg}\left(-1\right)}{t} \cdot -60\right) \cdot \left(x - y\right) \]
                  10. associate-*l/N/A

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

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

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

                    \[\leadsto \frac{-60}{t} \cdot \left(x - y\right) \]
                  14. lift--.f6428.2%

                    \[\leadsto \frac{-60}{t} \cdot \left(x - y\right) \]
                9. Applied rewrites28.2%

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

              Alternative 15: 55.8% accurate, 0.4× speedup?

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

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    \[\leadsto -60 \cdot \frac{y}{z - \color{blue}{t}} \]
                  3. lower--.f6426.0%

                    \[\leadsto -60 \cdot \frac{y}{z - t} \]
                13. Applied rewrites26.0%

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

                if -5.00000000000000031e-10 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999954e-22

                1. Initial program 99.4%

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

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

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

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

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

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

              Alternative 16: 55.4% accurate, 0.4× speedup?

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

                1. Initial program 99.4%

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

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

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

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

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

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

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

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

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

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

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

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

                  \[\leadsto -60 \cdot \frac{x}{\color{blue}{t}} \]
                9. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto -60 \cdot \frac{x}{t} \]
                  2. lower-/.f6416.3%

                    \[\leadsto -60 \cdot \frac{x}{t} \]
                10. Applied rewrites16.3%

                  \[\leadsto -60 \cdot \frac{x}{\color{blue}{t}} \]
                11. Taylor expanded in x around 0

                  \[\leadsto -60 \cdot \color{blue}{\frac{y}{z - t}} \]
                12. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto -60 \cdot \frac{y}{\color{blue}{z - t}} \]
                  2. lower-/.f64N/A

                    \[\leadsto -60 \cdot \frac{y}{z - \color{blue}{t}} \]
                  3. lower--.f6426.0%

                    \[\leadsto -60 \cdot \frac{y}{z - t} \]
                13. Applied rewrites26.0%

                  \[\leadsto -60 \cdot \color{blue}{\frac{y}{z - t}} \]

                if -5.00000000000000031e-10 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 4.99999999999999954e-22

                1. Initial program 99.4%

                  \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                2. Taylor expanded in z around inf

                  \[\leadsto \color{blue}{120 \cdot a} \]
                3. Step-by-step derivation
                  1. lower-*.f6451.4%

                    \[\leadsto 120 \cdot \color{blue}{a} \]
                4. Applied rewrites51.4%

                  \[\leadsto \color{blue}{120 \cdot a} \]
              3. Recombined 2 regimes into one program.
              4. Add Preprocessing

              Alternative 17: 54.9% accurate, 0.5× speedup?

              \[\begin{array}{l} t_1 := 60 \cdot \frac{y}{t}\\ t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+178}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 10^{+138}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
              (FPCore (x y z t a)
               :precision binary64
               (let* ((t_1 (* 60.0 (/ y t))) (t_2 (/ (* 60.0 (- x y)) (- z t))))
                 (if (<= t_2 -1e+178) t_1 (if (<= t_2 1e+138) (* 120.0 a) t_1))))
              double code(double x, double y, double z, double t, double a) {
              	double t_1 = 60.0 * (y / t);
              	double t_2 = (60.0 * (x - y)) / (z - t);
              	double tmp;
              	if (t_2 <= -1e+178) {
              		tmp = t_1;
              	} else if (t_2 <= 1e+138) {
              		tmp = 120.0 * a;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z, t, a)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8) :: t_1
                  real(8) :: t_2
                  real(8) :: tmp
                  t_1 = 60.0d0 * (y / t)
                  t_2 = (60.0d0 * (x - y)) / (z - t)
                  if (t_2 <= (-1d+178)) then
                      tmp = t_1
                  else if (t_2 <= 1d+138) then
                      tmp = 120.0d0 * a
                  else
                      tmp = t_1
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a) {
              	double t_1 = 60.0 * (y / t);
              	double t_2 = (60.0 * (x - y)) / (z - t);
              	double tmp;
              	if (t_2 <= -1e+178) {
              		tmp = t_1;
              	} else if (t_2 <= 1e+138) {
              		tmp = 120.0 * a;
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a):
              	t_1 = 60.0 * (y / t)
              	t_2 = (60.0 * (x - y)) / (z - t)
              	tmp = 0
              	if t_2 <= -1e+178:
              		tmp = t_1
              	elif t_2 <= 1e+138:
              		tmp = 120.0 * a
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t, a)
              	t_1 = Float64(60.0 * Float64(y / t))
              	t_2 = Float64(Float64(60.0 * Float64(x - y)) / Float64(z - t))
              	tmp = 0.0
              	if (t_2 <= -1e+178)
              		tmp = t_1;
              	elseif (t_2 <= 1e+138)
              		tmp = Float64(120.0 * a);
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a)
              	t_1 = 60.0 * (y / t);
              	t_2 = (60.0 * (x - y)) / (z - t);
              	tmp = 0.0;
              	if (t_2 <= -1e+178)
              		tmp = t_1;
              	elseif (t_2 <= 1e+138)
              		tmp = 120.0 * a;
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_] := Block[{t$95$1 = N[(60.0 * N[(y / t), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(60.0 * N[(x - y), $MachinePrecision]), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+178], t$95$1, If[LessEqual[t$95$2, 1e+138], N[(120.0 * a), $MachinePrecision], t$95$1]]]]
              
              \begin{array}{l}
              t_1 := 60 \cdot \frac{y}{t}\\
              t_2 := \frac{60 \cdot \left(x - y\right)}{z - t}\\
              \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+178}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;t\_2 \leq 10^{+138}:\\
              \;\;\;\;120 \cdot a\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < -1.0000000000000001e178 or 1e138 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t))

                1. Initial program 99.4%

                  \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                2. Taylor expanded in a around 0

                  \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
                3. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z - t}} \]
                  2. lower-/.f64N/A

                    \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z - t}} \]
                  3. lower--.f64N/A

                    \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
                  4. lower--.f6450.1%

                    \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
                4. Applied rewrites50.1%

                  \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
                5. Taylor expanded in z around 0

                  \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
                6. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto -60 \cdot \frac{x - y}{\color{blue}{t}} \]
                  2. lower-/.f64N/A

                    \[\leadsto -60 \cdot \frac{x - y}{t} \]
                  3. lower--.f6428.2%

                    \[\leadsto -60 \cdot \frac{x - y}{t} \]
                7. Applied rewrites28.2%

                  \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
                8. Taylor expanded in x around 0

                  \[\leadsto 60 \cdot \frac{y}{\color{blue}{t}} \]
                9. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto 60 \cdot \frac{y}{t} \]
                  2. lower-/.f6415.6%

                    \[\leadsto 60 \cdot \frac{y}{t} \]
                10. Applied rewrites15.6%

                  \[\leadsto 60 \cdot \frac{y}{\color{blue}{t}} \]

                if -1.0000000000000001e178 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 1e138

                1. Initial program 99.4%

                  \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                2. Taylor expanded in z around inf

                  \[\leadsto \color{blue}{120 \cdot a} \]
                3. Step-by-step derivation
                  1. lower-*.f6451.4%

                    \[\leadsto 120 \cdot \color{blue}{a} \]
                4. Applied rewrites51.4%

                  \[\leadsto \color{blue}{120 \cdot a} \]
              3. Recombined 2 regimes into one program.
              4. Add Preprocessing

              Alternative 18: 51.4% accurate, 1.6× speedup?

              \[\begin{array}{l} \mathbf{if}\;x \leq 9.6 \cdot 10^{+103}:\\ \;\;\;\;120 \cdot a\\ \mathbf{else}:\\ \;\;\;\;-60 \cdot \frac{x}{t}\\ \end{array} \]
              (FPCore (x y z t a)
               :precision binary64
               (if (<= x 9.6e+103) (* 120.0 a) (* -60.0 (/ x t))))
              double code(double x, double y, double z, double t, double a) {
              	double tmp;
              	if (x <= 9.6e+103) {
              		tmp = 120.0 * a;
              	} else {
              		tmp = -60.0 * (x / t);
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z, t, a)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8) :: tmp
                  if (x <= 9.6d+103) then
                      tmp = 120.0d0 * a
                  else
                      tmp = (-60.0d0) * (x / t)
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a) {
              	double tmp;
              	if (x <= 9.6e+103) {
              		tmp = 120.0 * a;
              	} else {
              		tmp = -60.0 * (x / t);
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a):
              	tmp = 0
              	if x <= 9.6e+103:
              		tmp = 120.0 * a
              	else:
              		tmp = -60.0 * (x / t)
              	return tmp
              
              function code(x, y, z, t, a)
              	tmp = 0.0
              	if (x <= 9.6e+103)
              		tmp = Float64(120.0 * a);
              	else
              		tmp = Float64(-60.0 * Float64(x / t));
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a)
              	tmp = 0.0;
              	if (x <= 9.6e+103)
              		tmp = 120.0 * a;
              	else
              		tmp = -60.0 * (x / t);
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_] := If[LessEqual[x, 9.6e+103], N[(120.0 * a), $MachinePrecision], N[(-60.0 * N[(x / t), $MachinePrecision]), $MachinePrecision]]
              
              \begin{array}{l}
              \mathbf{if}\;x \leq 9.6 \cdot 10^{+103}:\\
              \;\;\;\;120 \cdot a\\
              
              \mathbf{else}:\\
              \;\;\;\;-60 \cdot \frac{x}{t}\\
              
              
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if x < 9.5999999999999994e103

                1. Initial program 99.4%

                  \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                2. Taylor expanded in z around inf

                  \[\leadsto \color{blue}{120 \cdot a} \]
                3. Step-by-step derivation
                  1. lower-*.f6451.4%

                    \[\leadsto 120 \cdot \color{blue}{a} \]
                4. Applied rewrites51.4%

                  \[\leadsto \color{blue}{120 \cdot a} \]

                if 9.5999999999999994e103 < x

                1. Initial program 99.4%

                  \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
                2. Taylor expanded in a around 0

                  \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
                3. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z - t}} \]
                  2. lower-/.f64N/A

                    \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z - t}} \]
                  3. lower--.f64N/A

                    \[\leadsto 60 \cdot \frac{x - y}{\color{blue}{z} - t} \]
                  4. lower--.f6450.1%

                    \[\leadsto 60 \cdot \frac{x - y}{z - \color{blue}{t}} \]
                4. Applied rewrites50.1%

                  \[\leadsto \color{blue}{60 \cdot \frac{x - y}{z - t}} \]
                5. Taylor expanded in z around 0

                  \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
                6. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto -60 \cdot \frac{x - y}{\color{blue}{t}} \]
                  2. lower-/.f64N/A

                    \[\leadsto -60 \cdot \frac{x - y}{t} \]
                  3. lower--.f6428.2%

                    \[\leadsto -60 \cdot \frac{x - y}{t} \]
                7. Applied rewrites28.2%

                  \[\leadsto -60 \cdot \color{blue}{\frac{x - y}{t}} \]
                8. Taylor expanded in x around inf

                  \[\leadsto -60 \cdot \frac{x}{\color{blue}{t}} \]
                9. Step-by-step derivation
                  1. lower-*.f64N/A

                    \[\leadsto -60 \cdot \frac{x}{t} \]
                  2. lower-/.f6416.3%

                    \[\leadsto -60 \cdot \frac{x}{t} \]
                10. Applied rewrites16.3%

                  \[\leadsto -60 \cdot \frac{x}{\color{blue}{t}} \]
              3. Recombined 2 regimes into one program.
              4. Add Preprocessing

              Alternative 19: 51.2% accurate, 4.6× speedup?

              \[120 \cdot a \]
              (FPCore (x y z t a) :precision binary64 (* 120.0 a))
              double code(double x, double y, double z, double t, double a) {
              	return 120.0 * a;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z, t, a)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  code = 120.0d0 * a
              end function
              
              public static double code(double x, double y, double z, double t, double a) {
              	return 120.0 * a;
              }
              
              def code(x, y, z, t, a):
              	return 120.0 * a
              
              function code(x, y, z, t, a)
              	return Float64(120.0 * a)
              end
              
              function tmp = code(x, y, z, t, a)
              	tmp = 120.0 * a;
              end
              
              code[x_, y_, z_, t_, a_] := N[(120.0 * a), $MachinePrecision]
              
              120 \cdot a
              
              Derivation
              1. Initial program 99.4%

                \[\frac{60 \cdot \left(x - y\right)}{z - t} + a \cdot 120 \]
              2. Taylor expanded in z around inf

                \[\leadsto \color{blue}{120 \cdot a} \]
              3. Step-by-step derivation
                1. lower-*.f6451.4%

                  \[\leadsto 120 \cdot \color{blue}{a} \]
              4. Applied rewrites51.4%

                \[\leadsto \color{blue}{120 \cdot a} \]
              5. Add Preprocessing

              Reproduce

              ?
              herbie shell --seed 2025184 
              (FPCore (x y z t a)
                :name "Data.Colour.RGB:hslsv from colour-2.3.3, B"
                :precision binary64
                (+ (/ (* 60.0 (- x y)) (- z t)) (* a 120.0)))