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

Percentage Accurate: 99.5% → 99.8%
Time: 12.4s
Alternatives: 13
Speedup: 1.0×

Specification

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

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

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

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

Sampling outcomes in binary64 precision:

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

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

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

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

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

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

Alternative 1: 99.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{x - y}{z - t} \cdot 60 + a \cdot 120 \end{array} \]
(FPCore (x y z t a)
 :precision binary64
 (+ (* (/ (- x y) (- z t)) 60.0) (* a 120.0)))
double code(double x, double y, double z, double t, double a) {
	return (((x - y) / (z - t)) * 60.0) + (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 = (((x - y) / (z - t)) * 60.0d0) + (a * 120.0d0)
end function
public static double code(double x, double y, double z, double t, double a) {
	return (((x - y) / (z - t)) * 60.0) + (a * 120.0);
}
def code(x, y, z, t, a):
	return (((x - y) / (z - t)) * 60.0) + (a * 120.0)
function code(x, y, z, t, a)
	return Float64(Float64(Float64(Float64(x - y) / Float64(z - t)) * 60.0) + Float64(a * 120.0))
end
function tmp = code(x, y, z, t, a)
	tmp = (((x - y) / (z - t)) * 60.0) + (a * 120.0);
end
code[x_, y_, z_, t_, a_] := N[(N[(N[(N[(x - y), $MachinePrecision] / N[(z - t), $MachinePrecision]), $MachinePrecision] * 60.0), $MachinePrecision] + N[(a * 120.0), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{x - y}{z - t} \cdot 60 + a \cdot 120
\end{array}
Derivation
  1. Initial program 99.5%

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{x - y}{z - t} \cdot 60} + a \cdot 120 \]
    6. lower-/.f6499.8

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

    \[\leadsto \color{blue}{\frac{x - y}{z - t} \cdot 60} + a \cdot 120 \]
  5. Add Preprocessing

Alternative 2: 58.1% accurate, 0.4× speedup?

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

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

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

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

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

\mathbf{else}:\\
\;\;\;\;\frac{x - y}{z} \cdot 60\\


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

    1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{y}{t} \cdot 60 \]
        2. Step-by-step derivation
          1. Applied rewrites52.1%

            \[\leadsto y \cdot \frac{60}{t} \]

          if -3.9999999999999998e214 < (/.f64 (*.f64 #s(literal 60 binary64) (-.f64 x y)) (-.f64 z t)) < 3.99999999999999992e179

          1. Initial program 99.9%

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

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

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

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

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

          1. Initial program 96.4%

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

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

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

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

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

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

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

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

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

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

          Alternative 3: 53.2% accurate, 0.7× speedup?

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

            1. Initial program 99.8%

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

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

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

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

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

            1. Initial program 95.1%

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

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

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

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

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

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

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

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

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

            Alternative 4: 89.3% accurate, 0.8× speedup?

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

              1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                if -4.4999999999999998e58 < y < 2.39999999999999998e-8

                1. Initial program 99.1%

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

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

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

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

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

                    \[\leadsto \color{blue}{\frac{x - y}{z - t} \cdot 60} + a \cdot 120 \]
                  6. lower-/.f6499.9

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

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

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

                    \[\leadsto \color{blue}{\frac{x}{z - t}} \cdot 60 + a \cdot 120 \]
                  2. lower--.f6494.9

                    \[\leadsto \frac{x}{\color{blue}{z - t}} \cdot 60 + a \cdot 120 \]
                7. Applied rewrites94.9%

                  \[\leadsto \color{blue}{\frac{x}{z - t}} \cdot 60 + a \cdot 120 \]
              7. Recombined 2 regimes into one program.
              8. Final simplification93.8%

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

              Alternative 5: 89.3% accurate, 0.8× speedup?

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

                1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                  if -4.4999999999999998e58 < y < 2.39999999999999998e-8

                  1. Initial program 99.1%

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

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

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

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

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

                      \[\leadsto \color{blue}{\frac{x - y}{z - t} \cdot 60} + a \cdot 120 \]
                    6. lower-/.f6499.9

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

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

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

                      \[\leadsto \color{blue}{\frac{x}{z - t}} \cdot 60 + a \cdot 120 \]
                    2. lower--.f6494.9

                      \[\leadsto \frac{x}{\color{blue}{z - t}} \cdot 60 + a \cdot 120 \]
                  7. Applied rewrites94.9%

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

                  if 2.39999999999999998e-8 < y

                  1. Initial program 99.9%

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

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

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

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

                Alternative 6: 89.3% accurate, 0.8× speedup?

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

                  1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                    if -4.4999999999999998e58 < y < 2.39999999999999998e-8

                    1. Initial program 99.1%

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

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

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

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

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

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

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

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

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

                  Alternative 7: 82.0% accurate, 0.8× speedup?

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

                    1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                    if -3.5999999999999998e165 < x < 2.2999999999999999e210

                    1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

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

                      if 2.2999999999999999e210 < x

                      1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z - t}} \]
                        3. Step-by-step derivation
                          1. Applied rewrites71.6%

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

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

                        Alternative 8: 82.1% accurate, 0.8× speedup?

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

                          1. Initial program 96.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                          if -3.5999999999999998e165 < x < 2.2999999999999999e210

                          1. Initial program 99.8%

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

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

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

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

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

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

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

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

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

                          if 2.2999999999999999e210 < x

                          1. Initial program 99.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                              \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z - t}} \]
                            3. Step-by-step derivation
                              1. Applied rewrites71.6%

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

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

                            Alternative 9: 75.2% accurate, 0.9× speedup?

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

                              1. Initial program 99.9%

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

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

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

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

                              if -6.8e16 < a < 4.70000000000000023e32

                              1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                            Alternative 10: 75.1% accurate, 0.9× speedup?

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

                              1. Initial program 99.9%

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

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

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

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

                              if -6.8e16 < a < 4.70000000000000023e32

                              1. Initial program 99.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

                                  \[\leadsto 60 \cdot \color{blue}{\frac{x - y}{z - t}} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites73.7%

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

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

                                Alternative 11: 53.2% accurate, 1.1× speedup?

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

                                  1. Initial program 99.4%

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

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

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

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

                                  if -1.7000000000000001e-213 < a < 1.01999999999999995e-95

                                  1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

                                      \[\leadsto 60 \cdot \frac{y}{\color{blue}{t}} \]
                                    3. Step-by-step derivation
                                      1. Applied rewrites39.6%

                                        \[\leadsto \frac{y}{t} \cdot 60 \]
                                      2. Step-by-step derivation
                                        1. Applied rewrites39.7%

                                          \[\leadsto \frac{y \cdot 60}{t} \]
                                      3. Recombined 2 regimes into one program.
                                      4. Final simplification61.4%

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

                                      Alternative 12: 53.2% accurate, 1.1× speedup?

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

                                        1. Initial program 99.4%

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

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

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

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

                                        if -1.7000000000000001e-213 < a < 1.01999999999999995e-95

                                        1. Initial program 99.7%

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

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

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

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

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

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

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

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

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

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

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

                                            \[\leadsto 60 \cdot \frac{y}{\color{blue}{t}} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites39.6%

                                              \[\leadsto \frac{y}{t} \cdot 60 \]
                                            2. Step-by-step derivation
                                              1. Applied rewrites39.7%

                                                \[\leadsto y \cdot \frac{60}{t} \]
                                            3. Recombined 2 regimes into one program.
                                            4. Final simplification61.4%

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

                                            Alternative 13: 51.2% accurate, 5.2× speedup?

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

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

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

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

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

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

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

                                            Reproduce

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