Diagrams.Solve.Polynomial:cubForm from diagrams-solve-0.1, J

Percentage Accurate: 79.4% → 85.7%
Time: 8.4s
Alternatives: 17
Speedup: 0.7×

Specification

?
\[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
(FPCore (x y z t a b c)
 :precision binary64
 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
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, b, c)
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), intent (in) :: b
    real(8), intent (in) :: c
    code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c):
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
end
function tmp = code(x, y, z, t, a, b, c)
	tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}

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 17 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: 79.4% accurate, 1.0× speedup?

\[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
(FPCore (x y z t a b c)
 :precision binary64
 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
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, b, c)
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), intent (in) :: b
    real(8), intent (in) :: c
    code = ((((x * 9.0d0) * y) - (((z * 4.0d0) * t) * a)) + b) / (z * c)
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
def code(x, y, z, t, a, b, c):
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c)
function code(x, y, z, t, a, b, c)
	return Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c))
end
function tmp = code(x, y, z, t, a, b, c)
	tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}

Alternative 1: 85.7% accurate, 0.5× speedup?

\[\begin{array}{l} \mathbf{if}\;z \leq -1.4 \cdot 10^{+223}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4, \mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right), \frac{b}{z}\right)}{c}\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+100}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot z\right), \mathsf{min}\left(t, a\right), \mathsf{fma}\left(\mathsf{max}\left(x, y\right) \cdot \mathsf{min}\left(x, y\right), 9, b\right)\right)}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(\frac{9 \cdot \mathsf{min}\left(x, y\right)}{c}, \frac{\mathsf{max}\left(x, y\right)}{z}, \mathsf{max}\left(t, a\right) \cdot \mathsf{fma}\left(-4, \frac{\mathsf{min}\left(t, a\right)}{c}, \frac{b}{\mathsf{max}\left(t, a\right) \cdot \left(c \cdot z\right)}\right)\right)\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= z -1.4e+223)
   (/ (fma -4.0 (* (fmax t a) (fmin t a)) (/ b z)) c)
   (if (<= z 3.1e+100)
     (/
      (/
       (fma
        (* (fmax t a) (* -4.0 z))
        (fmin t a)
        (fma (* (fmax x y) (fmin x y)) 9.0 b))
       c)
      z)
     (fma
      (/ (* 9.0 (fmin x y)) c)
      (/ (fmax x y) z)
      (*
       (fmax t a)
       (fma -4.0 (/ (fmin t a) c) (/ b (* (fmax t a) (* c z)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (z <= -1.4e+223) {
		tmp = fma(-4.0, (fmax(t, a) * fmin(t, a)), (b / z)) / c;
	} else if (z <= 3.1e+100) {
		tmp = (fma((fmax(t, a) * (-4.0 * z)), fmin(t, a), fma((fmax(x, y) * fmin(x, y)), 9.0, b)) / c) / z;
	} else {
		tmp = fma(((9.0 * fmin(x, y)) / c), (fmax(x, y) / z), (fmax(t, a) * fma(-4.0, (fmin(t, a) / c), (b / (fmax(t, a) * (c * z))))));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (z <= -1.4e+223)
		tmp = Float64(fma(-4.0, Float64(fmax(t, a) * fmin(t, a)), Float64(b / z)) / c);
	elseif (z <= 3.1e+100)
		tmp = Float64(Float64(fma(Float64(fmax(t, a) * Float64(-4.0 * z)), fmin(t, a), fma(Float64(fmax(x, y) * fmin(x, y)), 9.0, b)) / c) / z);
	else
		tmp = fma(Float64(Float64(9.0 * fmin(x, y)) / c), Float64(fmax(x, y) / z), Float64(fmax(t, a) * fma(-4.0, Float64(fmin(t, a) / c), Float64(b / Float64(fmax(t, a) * Float64(c * z))))));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -1.4e+223], N[(N[(-4.0 * N[(N[Max[t, a], $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 3.1e+100], N[(N[(N[(N[(N[Max[t, a], $MachinePrecision] * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision] * N[Min[t, a], $MachinePrecision] + N[(N[(N[Max[x, y], $MachinePrecision] * N[Min[x, y], $MachinePrecision]), $MachinePrecision] * 9.0 + b), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], N[(N[(N[(9.0 * N[Min[x, y], $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] * N[(N[Max[x, y], $MachinePrecision] / z), $MachinePrecision] + N[(N[Max[t, a], $MachinePrecision] * N[(-4.0 * N[(N[Min[t, a], $MachinePrecision] / c), $MachinePrecision] + N[(b / N[(N[Max[t, a], $MachinePrecision] * N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}
\mathbf{if}\;z \leq -1.4 \cdot 10^{+223}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4, \mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right), \frac{b}{z}\right)}{c}\\

\mathbf{elif}\;z \leq 3.1 \cdot 10^{+100}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot z\right), \mathsf{min}\left(t, a\right), \mathsf{fma}\left(\mathsf{max}\left(x, y\right) \cdot \mathsf{min}\left(x, y\right), 9, b\right)\right)}{c}}{z}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(\frac{9 \cdot \mathsf{min}\left(x, y\right)}{c}, \frac{\mathsf{max}\left(x, y\right)}{z}, \mathsf{max}\left(t, a\right) \cdot \mathsf{fma}\left(-4, \frac{\mathsf{min}\left(t, a\right)}{c}, \frac{b}{\mathsf{max}\left(t, a\right) \cdot \left(c \cdot z\right)}\right)\right)\\


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

    1. Initial program 79.4%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      3. add-flipN/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y + \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      7. associate--l+N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}}{z \cdot c} \]
      8. div-addN/A

        \[\leadsto \color{blue}{\frac{\left(x \cdot 9\right) \cdot y}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}} \]
      9. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y}}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{z \cdot c}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{c \cdot z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      12. times-fracN/A

        \[\leadsto \color{blue}{\frac{x \cdot 9}{c} \cdot \frac{y}{z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x \cdot 9}{c}, \frac{y}{z}, \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}\right)} \]
    3. Applied rewrites71.4%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + \frac{b}{c \cdot z}} \]
    5. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      5. lower-*.f6463.1%

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
    6. Applied rewrites63.1%

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

      \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{\color{blue}{c}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c} \]
      2. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
      4. lower-/.f6463.7%

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
    9. Applied rewrites63.7%

      \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{\color{blue}{c}} \]

    if -1.3999999999999999e223 < z < 3.1000000000000001e100

    1. Initial program 79.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

      \[\leadsto \color{blue}{\frac{\frac{\mathsf{fma}\left(a \cdot \left(-4 \cdot z\right), t, \mathsf{fma}\left(y \cdot x, 9, b\right)\right)}{c}}{z}} \]

    if 3.1000000000000001e100 < z

    1. Initial program 79.4%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      3. add-flipN/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y + \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      7. associate--l+N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}}{z \cdot c} \]
      8. div-addN/A

        \[\leadsto \color{blue}{\frac{\left(x \cdot 9\right) \cdot y}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}} \]
      9. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y}}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{z \cdot c}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{c \cdot z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      12. times-fracN/A

        \[\leadsto \color{blue}{\frac{x \cdot 9}{c} \cdot \frac{y}{z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x \cdot 9}{c}, \frac{y}{z}, \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}\right)} \]
    3. Applied rewrites71.4%

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

      \[\leadsto \mathsf{fma}\left(\frac{9 \cdot x}{c}, \frac{y}{z}, \color{blue}{a \cdot \left(-4 \cdot \frac{t}{c} + \frac{b}{a \cdot \left(c \cdot z\right)}\right)}\right) \]
    5. Step-by-step derivation
      1. lower-*.f64N/A

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

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

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

        \[\leadsto \mathsf{fma}\left(\frac{9 \cdot x}{c}, \frac{y}{z}, a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right) \]
      5. lower-*.f64N/A

        \[\leadsto \mathsf{fma}\left(\frac{9 \cdot x}{c}, \frac{y}{z}, a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right) \]
      6. lower-*.f6471.7%

        \[\leadsto \mathsf{fma}\left(\frac{9 \cdot x}{c}, \frac{y}{z}, a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, \frac{b}{a \cdot \left(c \cdot z\right)}\right)\right) \]
    6. Applied rewrites71.7%

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

Alternative 2: 85.7% accurate, 0.7× speedup?

\[\begin{array}{l} t_1 := \frac{\mathsf{fma}\left(-4, \mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right), \frac{b}{z}\right)}{c}\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{+223}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.1 \cdot 10^{+108}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot z\right), \mathsf{min}\left(t, a\right), \mathsf{fma}\left(y \cdot x, 9, b\right)\right)}{c}}{z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (/ (fma -4.0 (* (fmax t a) (fmin t a)) (/ b z)) c)))
   (if (<= z -1.4e+223)
     t_1
     (if (<= z 3.1e+108)
       (/
        (/ (fma (* (fmax t a) (* -4.0 z)) (fmin t a) (fma (* y x) 9.0 b)) c)
        z)
       t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = fma(-4.0, (fmax(t, a) * fmin(t, a)), (b / z)) / c;
	double tmp;
	if (z <= -1.4e+223) {
		tmp = t_1;
	} else if (z <= 3.1e+108) {
		tmp = (fma((fmax(t, a) * (-4.0 * z)), fmin(t, a), fma((y * x), 9.0, b)) / c) / z;
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	t_1 = Float64(fma(-4.0, Float64(fmax(t, a) * fmin(t, a)), Float64(b / z)) / c)
	tmp = 0.0
	if (z <= -1.4e+223)
		tmp = t_1;
	elseif (z <= 3.1e+108)
		tmp = Float64(Float64(fma(Float64(fmax(t, a) * Float64(-4.0 * z)), fmin(t, a), fma(Float64(y * x), 9.0, b)) / c) / z);
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(-4.0 * N[(N[Max[t, a], $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.4e+223], t$95$1, If[LessEqual[z, 3.1e+108], N[(N[(N[(N[(N[Max[t, a], $MachinePrecision] * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision] * N[Min[t, a], $MachinePrecision] + N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(-4, \mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right), \frac{b}{z}\right)}{c}\\
\mathbf{if}\;z \leq -1.4 \cdot 10^{+223}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.1 \cdot 10^{+108}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot z\right), \mathsf{min}\left(t, a\right), \mathsf{fma}\left(y \cdot x, 9, b\right)\right)}{c}}{z}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.3999999999999999e223 or 3.1000000000000001e108 < z

    1. Initial program 79.4%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      3. add-flipN/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y + \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      7. associate--l+N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}}{z \cdot c} \]
      8. div-addN/A

        \[\leadsto \color{blue}{\frac{\left(x \cdot 9\right) \cdot y}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}} \]
      9. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y}}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{z \cdot c}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{c \cdot z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      12. times-fracN/A

        \[\leadsto \color{blue}{\frac{x \cdot 9}{c} \cdot \frac{y}{z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x \cdot 9}{c}, \frac{y}{z}, \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}\right)} \]
    3. Applied rewrites71.4%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + \frac{b}{c \cdot z}} \]
    5. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      5. lower-*.f6463.1%

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
    6. Applied rewrites63.1%

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

      \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{\color{blue}{c}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c} \]
      2. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
      4. lower-/.f6463.7%

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
    9. Applied rewrites63.7%

      \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{\color{blue}{c}} \]

    if -1.3999999999999999e223 < z < 3.1000000000000001e108

    1. Initial program 79.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

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

Alternative 3: 85.2% accurate, 0.7× speedup?

\[\begin{array}{l} t_1 := \frac{\mathsf{fma}\left(-4, \mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right), \frac{b}{z}\right)}{c}\\ \mathbf{if}\;z \leq -1.45 \cdot 10^{+191}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 2.7 \cdot 10^{+157}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\left(-4 \cdot z\right) \cdot \mathsf{max}\left(t, a\right), \mathsf{min}\left(t, a\right), \mathsf{fma}\left(y \cdot x, 9, b\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (/ (fma -4.0 (* (fmax t a) (fmin t a)) (/ b z)) c)))
   (if (<= z -1.45e+191)
     t_1
     (if (<= z 2.7e+157)
       (/
        (fma (* (* -4.0 z) (fmax t a)) (fmin t a) (fma (* y x) 9.0 b))
        (* z c))
       t_1))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = fma(-4.0, (fmax(t, a) * fmin(t, a)), (b / z)) / c;
	double tmp;
	if (z <= -1.45e+191) {
		tmp = t_1;
	} else if (z <= 2.7e+157) {
		tmp = fma(((-4.0 * z) * fmax(t, a)), fmin(t, a), fma((y * x), 9.0, b)) / (z * c);
	} else {
		tmp = t_1;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	t_1 = Float64(fma(-4.0, Float64(fmax(t, a) * fmin(t, a)), Float64(b / z)) / c)
	tmp = 0.0
	if (z <= -1.45e+191)
		tmp = t_1;
	elseif (z <= 2.7e+157)
		tmp = Float64(fma(Float64(Float64(-4.0 * z) * fmax(t, a)), fmin(t, a), fma(Float64(y * x), 9.0, b)) / Float64(z * c));
	else
		tmp = t_1;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(-4.0 * N[(N[Max[t, a], $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -1.45e+191], t$95$1, If[LessEqual[z, 2.7e+157], N[(N[(N[(N[(-4.0 * z), $MachinePrecision] * N[Max[t, a], $MachinePrecision]), $MachinePrecision] * N[Min[t, a], $MachinePrecision] + N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(-4, \mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right), \frac{b}{z}\right)}{c}\\
\mathbf{if}\;z \leq -1.45 \cdot 10^{+191}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{+157}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\left(-4 \cdot z\right) \cdot \mathsf{max}\left(t, a\right), \mathsf{min}\left(t, a\right), \mathsf{fma}\left(y \cdot x, 9, b\right)\right)}{z \cdot c}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.4500000000000001e191 or 2.7e157 < z

    1. Initial program 79.4%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      3. add-flipN/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y + \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      7. associate--l+N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}}{z \cdot c} \]
      8. div-addN/A

        \[\leadsto \color{blue}{\frac{\left(x \cdot 9\right) \cdot y}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}} \]
      9. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y}}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{z \cdot c}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{c \cdot z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      12. times-fracN/A

        \[\leadsto \color{blue}{\frac{x \cdot 9}{c} \cdot \frac{y}{z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x \cdot 9}{c}, \frac{y}{z}, \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}\right)} \]
    3. Applied rewrites71.4%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + \frac{b}{c \cdot z}} \]
    5. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      5. lower-*.f6463.1%

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
    6. Applied rewrites63.1%

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

      \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{\color{blue}{c}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c} \]
      2. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
      4. lower-/.f6463.7%

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
    9. Applied rewrites63.7%

      \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{\color{blue}{c}} \]

    if -1.4500000000000001e191 < z < 2.7e157

    1. Initial program 79.4%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)} + b}{z \cdot c} \]
      3. lift-*.f64N/A

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a + \left(x \cdot 9\right) \cdot y\right)} + b}{z \cdot c} \]
      6. associate-+l+N/A

        \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a + \left(\left(x \cdot 9\right) \cdot y + b\right)}}{z \cdot c} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(\color{blue}{\left(z \cdot 4\right) \cdot t}\right)\right) \cdot a + \left(\left(x \cdot 9\right) \cdot y + b\right)}{z \cdot c} \]
      8. distribute-lft-neg-inN/A

        \[\leadsto \frac{\color{blue}{\left(\left(\mathsf{neg}\left(z \cdot 4\right)\right) \cdot t\right)} \cdot a + \left(\left(x \cdot 9\right) \cdot y + b\right)}{z \cdot c} \]
      9. associate-*l*N/A

        \[\leadsto \frac{\color{blue}{\left(\mathsf{neg}\left(z \cdot 4\right)\right) \cdot \left(t \cdot a\right)} + \left(\left(x \cdot 9\right) \cdot y + b\right)}{z \cdot c} \]
      10. *-commutativeN/A

        \[\leadsto \frac{\left(\mathsf{neg}\left(z \cdot 4\right)\right) \cdot \color{blue}{\left(a \cdot t\right)} + \left(\left(x \cdot 9\right) \cdot y + b\right)}{z \cdot c} \]
      11. associate-*r*N/A

        \[\leadsto \frac{\color{blue}{\left(\left(\mathsf{neg}\left(z \cdot 4\right)\right) \cdot a\right) \cdot t} + \left(\left(x \cdot 9\right) \cdot y + b\right)}{z \cdot c} \]
      12. +-commutativeN/A

        \[\leadsto \frac{\left(\left(\mathsf{neg}\left(z \cdot 4\right)\right) \cdot a\right) \cdot t + \color{blue}{\left(b + \left(x \cdot 9\right) \cdot y\right)}}{z \cdot c} \]
      13. lower-fma.f64N/A

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(\left(\mathsf{neg}\left(z \cdot 4\right)\right) \cdot a, t, b + \left(x \cdot 9\right) \cdot y\right)}}{z \cdot c} \]
      14. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\left(\mathsf{neg}\left(z \cdot 4\right)\right) \cdot a}, t, b + \left(x \cdot 9\right) \cdot y\right)}{z \cdot c} \]
      15. lift-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\left(\mathsf{neg}\left(\color{blue}{z \cdot 4}\right)\right) \cdot a, t, b + \left(x \cdot 9\right) \cdot y\right)}{z \cdot c} \]
      16. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\left(\mathsf{neg}\left(\color{blue}{4 \cdot z}\right)\right) \cdot a, t, b + \left(x \cdot 9\right) \cdot y\right)}{z \cdot c} \]
      17. distribute-lft-neg-inN/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\left(\left(\mathsf{neg}\left(4\right)\right) \cdot z\right)} \cdot a, t, b + \left(x \cdot 9\right) \cdot y\right)}{z \cdot c} \]
      18. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{\left(\left(\mathsf{neg}\left(4\right)\right) \cdot z\right)} \cdot a, t, b + \left(x \cdot 9\right) \cdot y\right)}{z \cdot c} \]
      19. metadata-evalN/A

        \[\leadsto \frac{\mathsf{fma}\left(\left(\color{blue}{-4} \cdot z\right) \cdot a, t, b + \left(x \cdot 9\right) \cdot y\right)}{z \cdot c} \]
    3. Applied rewrites79.6%

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

Alternative 4: 85.2% accurate, 0.3× speedup?

\[\begin{array}{l} \mathbf{if}\;\frac{\left(\left(\mathsf{min}\left(x, y\right) \cdot 9\right) \cdot \mathsf{max}\left(x, y\right) - \left(\left(z \cdot 4\right) \cdot \mathsf{min}\left(t, a\right)\right) \cdot \mathsf{max}\left(t, a\right)\right) + b}{z \cdot c} \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{max}\left(x, y\right) \cdot 9, \mathsf{min}\left(x, y\right), \mathsf{fma}\left(-4, \left(\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)\right) \cdot z, b\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-4, \mathsf{min}\left(t, a\right) \cdot \frac{\mathsf{max}\left(t, a\right)}{c}, \frac{b}{c \cdot z}\right)\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (if (<=
      (/
       (+
        (-
         (* (* (fmin x y) 9.0) (fmax x y))
         (* (* (* z 4.0) (fmin t a)) (fmax t a)))
        b)
       (* z c))
      INFINITY)
   (/
    (fma
     (* (fmax x y) 9.0)
     (fmin x y)
     (fma -4.0 (* (* (fmax t a) (fmin t a)) z) b))
    (* z c))
   (fma -4.0 (* (fmin t a) (/ (fmax t a) c)) (/ b (* c z)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((((((fmin(x, y) * 9.0) * fmax(x, y)) - (((z * 4.0) * fmin(t, a)) * fmax(t, a))) + b) / (z * c)) <= ((double) INFINITY)) {
		tmp = fma((fmax(x, y) * 9.0), fmin(x, y), fma(-4.0, ((fmax(t, a) * fmin(t, a)) * z), b)) / (z * c);
	} else {
		tmp = fma(-4.0, (fmin(t, a) * (fmax(t, a) / c)), (b / (c * z)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (Float64(Float64(Float64(Float64(Float64(fmin(x, y) * 9.0) * fmax(x, y)) - Float64(Float64(Float64(z * 4.0) * fmin(t, a)) * fmax(t, a))) + b) / Float64(z * c)) <= Inf)
		tmp = Float64(fma(Float64(fmax(x, y) * 9.0), fmin(x, y), fma(-4.0, Float64(Float64(fmax(t, a) * fmin(t, a)) * z), b)) / Float64(z * c));
	else
		tmp = fma(-4.0, Float64(fmin(t, a) * Float64(fmax(t, a) / c)), Float64(b / Float64(c * z)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(N[(N[(N[(N[(N[Min[x, y], $MachinePrecision] * 9.0), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] * N[Max[t, a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(N[Max[x, y], $MachinePrecision] * 9.0), $MachinePrecision] * N[Min[x, y], $MachinePrecision] + N[(-4.0 * N[(N[(N[Max[t, a], $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[Min[t, a], $MachinePrecision] * N[(N[Max[t, a], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(\mathsf{min}\left(x, y\right) \cdot 9\right) \cdot \mathsf{max}\left(x, y\right) - \left(\left(z \cdot 4\right) \cdot \mathsf{min}\left(t, a\right)\right) \cdot \mathsf{max}\left(t, a\right)\right) + b}{z \cdot c} \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{max}\left(x, y\right) \cdot 9, \mathsf{min}\left(x, y\right), \mathsf{fma}\left(-4, \left(\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)\right) \cdot z, b\right)\right)}{z \cdot c}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-4, \mathsf{min}\left(t, a\right) \cdot \frac{\mathsf{max}\left(t, a\right)}{c}, \frac{b}{c \cdot z}\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0

    1. Initial program 79.4%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)} + b}{z \cdot c} \]
      3. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y + \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a\right)} + b}{z \cdot c} \]
      5. associate-+l+N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a + b\right)}}{z \cdot c} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y} + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a + b\right)}{z \cdot c} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right)} \cdot y + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a + b\right)}{z \cdot c} \]
      8. associate-*l*N/A

        \[\leadsto \frac{\color{blue}{x \cdot \left(9 \cdot y\right)} + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a + b\right)}{z \cdot c} \]
      9. *-commutativeN/A

        \[\leadsto \frac{\color{blue}{\left(9 \cdot y\right) \cdot x} + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a + b\right)}{z \cdot c} \]
      10. add-flip-revN/A

        \[\leadsto \frac{\left(9 \cdot y\right) \cdot x + \color{blue}{\left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}}{z \cdot c} \]
      11. lower-fma.f64N/A

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{y \cdot 9}, x, \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}{z \cdot c} \]
      14. add-flip-revN/A

        \[\leadsto \frac{\mathsf{fma}\left(y \cdot 9, x, \color{blue}{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a + b}\right)}{z \cdot c} \]
    3. Applied rewrites80.7%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(y \cdot 9, x, \mathsf{fma}\left(-4, \left(a \cdot t\right) \cdot z, b\right)\right)}}{z \cdot c} \]

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c))

    1. Initial program 79.4%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      3. add-flipN/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y + \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      7. associate--l+N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}}{z \cdot c} \]
      8. div-addN/A

        \[\leadsto \color{blue}{\frac{\left(x \cdot 9\right) \cdot y}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}} \]
      9. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y}}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{z \cdot c}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{c \cdot z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      12. times-fracN/A

        \[\leadsto \color{blue}{\frac{x \cdot 9}{c} \cdot \frac{y}{z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x \cdot 9}{c}, \frac{y}{z}, \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}\right)} \]
    3. Applied rewrites71.4%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + \frac{b}{c \cdot z}} \]
    5. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      5. lower-*.f6463.1%

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
    6. Applied rewrites63.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right)} \]
    7. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{\color{blue}{c}}, \frac{b}{c \cdot z}\right) \]
      2. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{t \cdot a}{c}, \frac{b}{c \cdot z}\right) \]
      4. associate-/l*N/A

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

        \[\leadsto \mathsf{fma}\left(-4, t \cdot \color{blue}{\frac{a}{c}}, \frac{b}{c \cdot z}\right) \]
      6. lower-/.f6463.4%

        \[\leadsto \mathsf{fma}\left(-4, t \cdot \frac{a}{\color{blue}{c}}, \frac{b}{c \cdot z}\right) \]
    8. Applied rewrites63.4%

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

Alternative 5: 85.1% accurate, 0.4× speedup?

\[\begin{array}{l} \mathbf{if}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot \mathsf{min}\left(t, a\right)\right) \cdot \mathsf{max}\left(t, a\right)\right) + b}{z \cdot c} \leq \infty:\\ \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, \mathsf{fma}\left(-4, \left(\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)\right) \cdot z, b\right)\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{fma}\left(-4, \mathsf{min}\left(t, a\right) \cdot \frac{\mathsf{max}\left(t, a\right)}{c}, \frac{b}{c \cdot z}\right)\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (if (<=
      (/
       (+ (- (* (* x 9.0) y) (* (* (* z 4.0) (fmin t a)) (fmax t a))) b)
       (* z c))
      INFINITY)
   (/ (fma (* 9.0 x) y (fma -4.0 (* (* (fmax t a) (fmin t a)) z) b)) (* z c))
   (fma -4.0 (* (fmin t a) (/ (fmax t a) c)) (/ b (* c z)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if ((((((x * 9.0) * y) - (((z * 4.0) * fmin(t, a)) * fmax(t, a))) + b) / (z * c)) <= ((double) INFINITY)) {
		tmp = fma((9.0 * x), y, fma(-4.0, ((fmax(t, a) * fmin(t, a)) * z), b)) / (z * c);
	} else {
		tmp = fma(-4.0, (fmin(t, a) * (fmax(t, a) / c)), (b / (c * z)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * fmin(t, a)) * fmax(t, a))) + b) / Float64(z * c)) <= Inf)
		tmp = Float64(fma(Float64(9.0 * x), y, fma(-4.0, Float64(Float64(fmax(t, a) * fmin(t, a)) * z), b)) / Float64(z * c));
	else
		tmp = fma(-4.0, Float64(fmin(t, a) * Float64(fmax(t, a) / c)), Float64(b / Float64(c * z)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[(N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - N[(N[(N[(z * 4.0), $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] * N[Max[t, a], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], Infinity], N[(N[(N[(9.0 * x), $MachinePrecision] * y + N[(-4.0 * N[(N[(N[Max[t, a], $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[Min[t, a], $MachinePrecision] * N[(N[Max[t, a], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}
\mathbf{if}\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot \mathsf{min}\left(t, a\right)\right) \cdot \mathsf{max}\left(t, a\right)\right) + b}{z \cdot c} \leq \infty:\\
\;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, \mathsf{fma}\left(-4, \left(\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)\right) \cdot z, b\right)\right)}{z \cdot c}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{fma}\left(-4, \mathsf{min}\left(t, a\right) \cdot \frac{\mathsf{max}\left(t, a\right)}{c}, \frac{b}{c \cdot z}\right)\\


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < +inf.0

    1. Initial program 79.4%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)} + b}{z \cdot c} \]
      3. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y + \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a\right)} + b}{z \cdot c} \]
      5. associate-+l+N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a + b\right)}}{z \cdot c} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y} + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a + b\right)}{z \cdot c} \]
      7. add-flip-revN/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y + \color{blue}{\left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}}{z \cdot c} \]
      8. lower-fma.f64N/A

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(\color{blue}{9 \cdot x}, y, \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}{z \cdot c} \]
      12. add-flip-revN/A

        \[\leadsto \frac{\mathsf{fma}\left(9 \cdot x, y, \color{blue}{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a + b}\right)}{z \cdot c} \]
    3. Applied rewrites80.7%

      \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(9 \cdot x, y, \mathsf{fma}\left(-4, \left(a \cdot t\right) \cdot z, b\right)\right)}}{z \cdot c} \]

    if +inf.0 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c))

    1. Initial program 79.4%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      3. add-flipN/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y + \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      7. associate--l+N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}}{z \cdot c} \]
      8. div-addN/A

        \[\leadsto \color{blue}{\frac{\left(x \cdot 9\right) \cdot y}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}} \]
      9. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y}}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{z \cdot c}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{c \cdot z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      12. times-fracN/A

        \[\leadsto \color{blue}{\frac{x \cdot 9}{c} \cdot \frac{y}{z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x \cdot 9}{c}, \frac{y}{z}, \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}\right)} \]
    3. Applied rewrites71.4%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + \frac{b}{c \cdot z}} \]
    5. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      5. lower-*.f6463.1%

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
    6. Applied rewrites63.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right)} \]
    7. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{\color{blue}{c}}, \frac{b}{c \cdot z}\right) \]
      2. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{t \cdot a}{c}, \frac{b}{c \cdot z}\right) \]
      4. associate-/l*N/A

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

        \[\leadsto \mathsf{fma}\left(-4, t \cdot \color{blue}{\frac{a}{c}}, \frac{b}{c \cdot z}\right) \]
      6. lower-/.f6463.4%

        \[\leadsto \mathsf{fma}\left(-4, t \cdot \frac{a}{\color{blue}{c}}, \frac{b}{c \cdot z}\right) \]
    8. Applied rewrites63.4%

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

Alternative 6: 75.8% accurate, 0.4× speedup?

\[\begin{array}{l} t_1 := \mathsf{min}\left(x, y\right) \cdot 9\\ t_2 := t\_1 \cdot \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-12}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{t\_1}{c}, \mathsf{max}\left(x, y\right), \frac{b}{c}\right)}{z}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+71}:\\ \;\;\;\;\mathsf{fma}\left(-4, t \cdot \frac{a}{c}, \frac{b}{c \cdot z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot \mathsf{min}\left(x, y\right), \mathsf{max}\left(x, y\right), \left(\left(t \cdot z\right) \cdot a\right) \cdot -4\right)}{c \cdot z}\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* (fmin x y) 9.0)) (t_2 (* t_1 (fmax x y))))
   (if (<= t_2 -1e-12)
     (/ (fma (/ t_1 c) (fmax x y) (/ b c)) z)
     (if (<= t_2 2e+71)
       (fma -4.0 (* t (/ a c)) (/ b (* c z)))
       (/
        (fma (* 9.0 (fmin x y)) (fmax x y) (* (* (* t z) a) -4.0))
        (* c z))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = fmin(x, y) * 9.0;
	double t_2 = t_1 * fmax(x, y);
	double tmp;
	if (t_2 <= -1e-12) {
		tmp = fma((t_1 / c), fmax(x, y), (b / c)) / z;
	} else if (t_2 <= 2e+71) {
		tmp = fma(-4.0, (t * (a / c)), (b / (c * z)));
	} else {
		tmp = fma((9.0 * fmin(x, y)), fmax(x, y), (((t * z) * a) * -4.0)) / (c * z);
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	t_1 = Float64(fmin(x, y) * 9.0)
	t_2 = Float64(t_1 * fmax(x, y))
	tmp = 0.0
	if (t_2 <= -1e-12)
		tmp = Float64(fma(Float64(t_1 / c), fmax(x, y), Float64(b / c)) / z);
	elseif (t_2 <= 2e+71)
		tmp = fma(-4.0, Float64(t * Float64(a / c)), Float64(b / Float64(c * z)));
	else
		tmp = Float64(fma(Float64(9.0 * fmin(x, y)), fmax(x, y), Float64(Float64(Float64(t * z) * a) * -4.0)) / Float64(c * z));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[Min[x, y], $MachinePrecision] * 9.0), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-12], N[(N[(N[(t$95$1 / c), $MachinePrecision] * N[Max[x, y], $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 2e+71], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(9.0 * N[Min[x, y], $MachinePrecision]), $MachinePrecision] * N[Max[x, y], $MachinePrecision] + N[(N[(N[(t * z), $MachinePrecision] * a), $MachinePrecision] * -4.0), $MachinePrecision]), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := \mathsf{min}\left(x, y\right) \cdot 9\\
t_2 := t\_1 \cdot \mathsf{max}\left(x, y\right)\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-12}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{t\_1}{c}, \mathsf{max}\left(x, y\right), \frac{b}{c}\right)}{z}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+71}:\\
\;\;\;\;\mathsf{fma}\left(-4, t \cdot \frac{a}{c}, \frac{b}{c \cdot z}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\mathsf{fma}\left(9 \cdot \mathsf{min}\left(x, y\right), \mathsf{max}\left(x, y\right), \left(\left(t \cdot z\right) \cdot a\right) \cdot -4\right)}{c \cdot z}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.9999999999999998e-13

    1. Initial program 79.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

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

      \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
    5. Step-by-step derivation
      1. lower-/.f64N/A

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

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      4. lower-*.f6460.5%

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
    6. Applied rewrites60.5%

      \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
    7. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{\color{blue}{c}}}{z} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      3. div-addN/A

        \[\leadsto \frac{\frac{b}{c} + \color{blue}{\frac{9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{\frac{b}{c} + \frac{9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      5. lift-*.f64N/A

        \[\leadsto \frac{\frac{b}{c} + \frac{9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      6. associate-*l*N/A

        \[\leadsto \frac{\frac{b}{c} + \frac{\left(9 \cdot x\right) \cdot y}{c}}{z} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{\frac{b}{c} + \frac{\left(9 \cdot x\right) \cdot y}{c}}{z} \]
      8. associate-*l/N/A

        \[\leadsto \frac{\frac{b}{c} + \frac{9 \cdot x}{c} \cdot \color{blue}{y}}{z} \]
      9. lift-/.f64N/A

        \[\leadsto \frac{\frac{b}{c} + \frac{9 \cdot x}{c} \cdot y}{z} \]
      10. +-commutativeN/A

        \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot y + \color{blue}{\frac{b}{c}}}{z} \]
      11. lower-fma.f64N/A

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

        \[\leadsto \frac{\mathsf{fma}\left(\frac{9 \cdot x}{c}, y, \frac{b}{c}\right)}{z} \]
      13. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{x \cdot 9}{c}, y, \frac{b}{c}\right)}{z} \]
      14. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{x \cdot 9}{c}, y, \frac{b}{c}\right)}{z} \]
      15. lower-/.f6459.3%

        \[\leadsto \frac{\mathsf{fma}\left(\frac{x \cdot 9}{c}, y, \frac{b}{c}\right)}{z} \]
    8. Applied rewrites59.3%

      \[\leadsto \frac{\mathsf{fma}\left(\frac{x \cdot 9}{c}, \color{blue}{y}, \frac{b}{c}\right)}{z} \]

    if -9.9999999999999998e-13 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.0000000000000001e71

    1. Initial program 79.4%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      3. add-flipN/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y + \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      7. associate--l+N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}}{z \cdot c} \]
      8. div-addN/A

        \[\leadsto \color{blue}{\frac{\left(x \cdot 9\right) \cdot y}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}} \]
      9. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y}}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{z \cdot c}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{c \cdot z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      12. times-fracN/A

        \[\leadsto \color{blue}{\frac{x \cdot 9}{c} \cdot \frac{y}{z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x \cdot 9}{c}, \frac{y}{z}, \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}\right)} \]
    3. Applied rewrites71.4%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + \frac{b}{c \cdot z}} \]
    5. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      5. lower-*.f6463.1%

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
    6. Applied rewrites63.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right)} \]
    7. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{\color{blue}{c}}, \frac{b}{c \cdot z}\right) \]
      2. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{t \cdot a}{c}, \frac{b}{c \cdot z}\right) \]
      4. associate-/l*N/A

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

        \[\leadsto \mathsf{fma}\left(-4, t \cdot \color{blue}{\frac{a}{c}}, \frac{b}{c \cdot z}\right) \]
      6. lower-/.f6463.4%

        \[\leadsto \mathsf{fma}\left(-4, t \cdot \frac{a}{\color{blue}{c}}, \frac{b}{c \cdot z}\right) \]
    8. Applied rewrites63.4%

      \[\leadsto \mathsf{fma}\left(-4, t \cdot \color{blue}{\frac{a}{c}}, \frac{b}{c \cdot z}\right) \]

    if 2.0000000000000001e71 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 79.4%

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

      \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
      7. lower-*.f64N/A

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
      8. lower-*.f6456.1%

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot \color{blue}{z}} \]
    4. Applied rewrites56.1%

      \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
    5. Step-by-step derivation
      1. lift--.f64N/A

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

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
      3. *-commutativeN/A

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - \left(a \cdot \left(t \cdot z\right)\right) \cdot 4}{c \cdot z} \]
      4. fp-cancel-sub-sign-invN/A

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

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) + \left(\mathsf{neg}\left(a \cdot \left(t \cdot z\right)\right)\right) \cdot 4}{c \cdot z} \]
      6. lift-*.f64N/A

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) + \left(\mathsf{neg}\left(a \cdot \left(t \cdot z\right)\right)\right) \cdot 4}{c \cdot z} \]
      7. associate-*r*N/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y + \left(\mathsf{neg}\left(a \cdot \left(t \cdot z\right)\right)\right) \cdot 4}{c \cdot z} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y + \left(\mathsf{neg}\left(a \cdot \left(t \cdot z\right)\right)\right) \cdot 4}{c \cdot z} \]
      9. distribute-lft-neg-inN/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y + \left(\mathsf{neg}\left(\left(a \cdot \left(t \cdot z\right)\right) \cdot 4\right)\right)}{c \cdot z} \]
      10. *-commutativeN/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y + \left(\mathsf{neg}\left(4 \cdot \left(a \cdot \left(t \cdot z\right)\right)\right)\right)}{c \cdot z} \]
      11. distribute-lft-neg-outN/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y + \left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
      12. metadata-evalN/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y + -4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
      13. lift-*.f64N/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y + -4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
      14. lift-*.f64N/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y + -4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
      15. associate-*l*N/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y + -4 \cdot \left(\left(a \cdot t\right) \cdot z\right)}{c \cdot z} \]
      16. lift-*.f64N/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y + -4 \cdot \left(\left(a \cdot t\right) \cdot z\right)}{c \cdot z} \]
      17. lift-*.f64N/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y + -4 \cdot \left(\left(a \cdot t\right) \cdot z\right)}{c \cdot z} \]
      18. lower-fma.f64N/A

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

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

        \[\leadsto \frac{\mathsf{fma}\left(9 \cdot x, y, -4 \cdot \left(\left(a \cdot t\right) \cdot z\right)\right)}{c \cdot z} \]
      21. associate-*l*N/A

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

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

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

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

Alternative 7: 75.4% accurate, 0.5× speedup?

\[\begin{array}{l} t_1 := \mathsf{min}\left(x, y\right) \cdot 9\\ t_2 := t\_1 \cdot \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{-12}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\frac{t\_1}{c}, \mathsf{max}\left(x, y\right), \frac{b}{c}\right)}{z}\\ \mathbf{elif}\;t\_2 \leq 10^{+99}:\\ \;\;\;\;\mathsf{fma}\left(-4, t \cdot \frac{a}{c}, \frac{b}{c \cdot z}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{max}\left(x, y\right) \cdot \mathsf{min}\left(x, y\right), 9, b\right)}{c}}{z}\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* (fmin x y) 9.0)) (t_2 (* t_1 (fmax x y))))
   (if (<= t_2 -1e-12)
     (/ (fma (/ t_1 c) (fmax x y) (/ b c)) z)
     (if (<= t_2 1e+99)
       (fma -4.0 (* t (/ a c)) (/ b (* c z)))
       (/ (/ (fma (* (fmax x y) (fmin x y)) 9.0 b) c) z)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = fmin(x, y) * 9.0;
	double t_2 = t_1 * fmax(x, y);
	double tmp;
	if (t_2 <= -1e-12) {
		tmp = fma((t_1 / c), fmax(x, y), (b / c)) / z;
	} else if (t_2 <= 1e+99) {
		tmp = fma(-4.0, (t * (a / c)), (b / (c * z)));
	} else {
		tmp = (fma((fmax(x, y) * fmin(x, y)), 9.0, b) / c) / z;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	t_1 = Float64(fmin(x, y) * 9.0)
	t_2 = Float64(t_1 * fmax(x, y))
	tmp = 0.0
	if (t_2 <= -1e-12)
		tmp = Float64(fma(Float64(t_1 / c), fmax(x, y), Float64(b / c)) / z);
	elseif (t_2 <= 1e+99)
		tmp = fma(-4.0, Float64(t * Float64(a / c)), Float64(b / Float64(c * z)));
	else
		tmp = Float64(Float64(fma(Float64(fmax(x, y) * fmin(x, y)), 9.0, b) / c) / z);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[Min[x, y], $MachinePrecision] * 9.0), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-12], N[(N[(N[(t$95$1 / c), $MachinePrecision] * N[Max[x, y], $MachinePrecision] + N[(b / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 1e+99], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(N[Max[x, y], $MachinePrecision] * N[Min[x, y], $MachinePrecision]), $MachinePrecision] * 9.0 + b), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := \mathsf{min}\left(x, y\right) \cdot 9\\
t_2 := t\_1 \cdot \mathsf{max}\left(x, y\right)\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{-12}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\frac{t\_1}{c}, \mathsf{max}\left(x, y\right), \frac{b}{c}\right)}{z}\\

\mathbf{elif}\;t\_2 \leq 10^{+99}:\\
\;\;\;\;\mathsf{fma}\left(-4, t \cdot \frac{a}{c}, \frac{b}{c \cdot z}\right)\\

\mathbf{else}:\\
\;\;\;\;\frac{\frac{\mathsf{fma}\left(\mathsf{max}\left(x, y\right) \cdot \mathsf{min}\left(x, y\right), 9, b\right)}{c}}{z}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.9999999999999998e-13

    1. Initial program 79.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

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

      \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
    5. Step-by-step derivation
      1. lower-/.f64N/A

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

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      4. lower-*.f6460.5%

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
    6. Applied rewrites60.5%

      \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
    7. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{\color{blue}{c}}}{z} \]
      2. lift-+.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      3. div-addN/A

        \[\leadsto \frac{\frac{b}{c} + \color{blue}{\frac{9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
      4. lift-*.f64N/A

        \[\leadsto \frac{\frac{b}{c} + \frac{9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      5. lift-*.f64N/A

        \[\leadsto \frac{\frac{b}{c} + \frac{9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      6. associate-*l*N/A

        \[\leadsto \frac{\frac{b}{c} + \frac{\left(9 \cdot x\right) \cdot y}{c}}{z} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{\frac{b}{c} + \frac{\left(9 \cdot x\right) \cdot y}{c}}{z} \]
      8. associate-*l/N/A

        \[\leadsto \frac{\frac{b}{c} + \frac{9 \cdot x}{c} \cdot \color{blue}{y}}{z} \]
      9. lift-/.f64N/A

        \[\leadsto \frac{\frac{b}{c} + \frac{9 \cdot x}{c} \cdot y}{z} \]
      10. +-commutativeN/A

        \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot y + \color{blue}{\frac{b}{c}}}{z} \]
      11. lower-fma.f64N/A

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

        \[\leadsto \frac{\mathsf{fma}\left(\frac{9 \cdot x}{c}, y, \frac{b}{c}\right)}{z} \]
      13. *-commutativeN/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{x \cdot 9}{c}, y, \frac{b}{c}\right)}{z} \]
      14. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(\frac{x \cdot 9}{c}, y, \frac{b}{c}\right)}{z} \]
      15. lower-/.f6459.3%

        \[\leadsto \frac{\mathsf{fma}\left(\frac{x \cdot 9}{c}, y, \frac{b}{c}\right)}{z} \]
    8. Applied rewrites59.3%

      \[\leadsto \frac{\mathsf{fma}\left(\frac{x \cdot 9}{c}, \color{blue}{y}, \frac{b}{c}\right)}{z} \]

    if -9.9999999999999998e-13 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999997e98

    1. Initial program 79.4%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      3. add-flipN/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y + \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      7. associate--l+N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}}{z \cdot c} \]
      8. div-addN/A

        \[\leadsto \color{blue}{\frac{\left(x \cdot 9\right) \cdot y}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}} \]
      9. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y}}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{z \cdot c}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{c \cdot z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      12. times-fracN/A

        \[\leadsto \color{blue}{\frac{x \cdot 9}{c} \cdot \frac{y}{z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x \cdot 9}{c}, \frac{y}{z}, \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}\right)} \]
    3. Applied rewrites71.4%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + \frac{b}{c \cdot z}} \]
    5. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      5. lower-*.f6463.1%

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
    6. Applied rewrites63.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right)} \]
    7. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{\color{blue}{c}}, \frac{b}{c \cdot z}\right) \]
      2. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{t \cdot a}{c}, \frac{b}{c \cdot z}\right) \]
      4. associate-/l*N/A

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

        \[\leadsto \mathsf{fma}\left(-4, t \cdot \color{blue}{\frac{a}{c}}, \frac{b}{c \cdot z}\right) \]
      6. lower-/.f6463.4%

        \[\leadsto \mathsf{fma}\left(-4, t \cdot \frac{a}{\color{blue}{c}}, \frac{b}{c \cdot z}\right) \]
    8. Applied rewrites63.4%

      \[\leadsto \mathsf{fma}\left(-4, t \cdot \color{blue}{\frac{a}{c}}, \frac{b}{c \cdot z}\right) \]

    if 9.9999999999999997e98 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 79.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

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

      \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
    5. Step-by-step derivation
      1. lower-/.f64N/A

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

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      4. lower-*.f6460.5%

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
    6. Applied rewrites60.5%

      \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
    7. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(y \cdot x\right)}{c}}{z} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{b + \left(y \cdot x\right) \cdot 9}{c}}{z} \]
      6. +-commutativeN/A

        \[\leadsto \frac{\frac{\left(y \cdot x\right) \cdot 9 + b}{c}}{z} \]
      7. *-commutativeN/A

        \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
      9. lower-fma.f6460.5%

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
      12. lower-*.f6460.5%

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
    8. Applied rewrites60.5%

      \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
  3. Recombined 3 regimes into one program.
  4. Add Preprocessing

Alternative 8: 74.9% accurate, 0.7× speedup?

\[\begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-12}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{+99}:\\ \;\;\;\;\mathsf{fma}\left(-4, t \cdot \frac{a}{c}, \frac{b}{c \cdot z}\right)\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* (* x 9.0) y)) (t_2 (/ (/ (fma (* y x) 9.0 b) c) z)))
   (if (<= t_1 -1e-12)
     t_2
     (if (<= t_1 1e+99) (fma -4.0 (* t (/ a c)) (/ b (* c z))) t_2))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (x * 9.0) * y;
	double t_2 = (fma((y * x), 9.0, b) / c) / z;
	double tmp;
	if (t_1 <= -1e-12) {
		tmp = t_2;
	} else if (t_1 <= 1e+99) {
		tmp = fma(-4.0, (t * (a / c)), (b / (c * z)));
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(x * 9.0) * y)
	t_2 = Float64(Float64(fma(Float64(y * x), 9.0, b) / c) / z)
	tmp = 0.0
	if (t_1 <= -1e-12)
		tmp = t_2;
	elseif (t_1 <= 1e+99)
		tmp = fma(-4.0, Float64(t * Float64(a / c)), Float64(b / Float64(c * z)));
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-12], t$95$2, If[LessEqual[t$95$1, 1e+99], N[(-4.0 * N[(t * N[(a / c), $MachinePrecision]), $MachinePrecision] + N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
t_2 := \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}\\
\mathbf{if}\;t\_1 \leq -1 \cdot 10^{-12}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 10^{+99}:\\
\;\;\;\;\mathsf{fma}\left(-4, t \cdot \frac{a}{c}, \frac{b}{c \cdot z}\right)\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.9999999999999998e-13 or 9.9999999999999997e98 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 79.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

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

      \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
    5. Step-by-step derivation
      1. lower-/.f64N/A

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

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      4. lower-*.f6460.5%

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
    6. Applied rewrites60.5%

      \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
    7. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(y \cdot x\right)}{c}}{z} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{b + \left(y \cdot x\right) \cdot 9}{c}}{z} \]
      6. +-commutativeN/A

        \[\leadsto \frac{\frac{\left(y \cdot x\right) \cdot 9 + b}{c}}{z} \]
      7. *-commutativeN/A

        \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
      9. lower-fma.f6460.5%

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
      12. lower-*.f6460.5%

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
    8. Applied rewrites60.5%

      \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]

    if -9.9999999999999998e-13 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999997e98

    1. Initial program 79.4%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      3. add-flipN/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y + \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      7. associate--l+N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}}{z \cdot c} \]
      8. div-addN/A

        \[\leadsto \color{blue}{\frac{\left(x \cdot 9\right) \cdot y}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}} \]
      9. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y}}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{z \cdot c}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{c \cdot z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      12. times-fracN/A

        \[\leadsto \color{blue}{\frac{x \cdot 9}{c} \cdot \frac{y}{z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x \cdot 9}{c}, \frac{y}{z}, \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}\right)} \]
    3. Applied rewrites71.4%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + \frac{b}{c \cdot z}} \]
    5. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      5. lower-*.f6463.1%

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
    6. Applied rewrites63.1%

      \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right)} \]
    7. Step-by-step derivation
      1. lift-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{\color{blue}{c}}, \frac{b}{c \cdot z}\right) \]
      2. lift-*.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      3. *-commutativeN/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{t \cdot a}{c}, \frac{b}{c \cdot z}\right) \]
      4. associate-/l*N/A

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

        \[\leadsto \mathsf{fma}\left(-4, t \cdot \color{blue}{\frac{a}{c}}, \frac{b}{c \cdot z}\right) \]
      6. lower-/.f6463.4%

        \[\leadsto \mathsf{fma}\left(-4, t \cdot \frac{a}{\color{blue}{c}}, \frac{b}{c \cdot z}\right) \]
    8. Applied rewrites63.4%

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

Alternative 9: 74.6% accurate, 0.8× speedup?

\[\begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{-6}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 10^{+99}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* (* x 9.0) y)) (t_2 (/ (/ (fma (* y x) 9.0 b) c) z)))
   (if (<= t_1 -2e-6)
     t_2
     (if (<= t_1 1e+99) (/ (fma -4.0 (* a t) (/ b z)) c) t_2))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (x * 9.0) * y;
	double t_2 = (fma((y * x), 9.0, b) / c) / z;
	double tmp;
	if (t_1 <= -2e-6) {
		tmp = t_2;
	} else if (t_1 <= 1e+99) {
		tmp = fma(-4.0, (a * t), (b / z)) / c;
	} else {
		tmp = t_2;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(x * 9.0) * y)
	t_2 = Float64(Float64(fma(Float64(y * x), 9.0, b) / c) / z)
	tmp = 0.0
	if (t_1 <= -2e-6)
		tmp = t_2;
	elseif (t_1 <= 1e+99)
		tmp = Float64(fma(-4.0, Float64(a * t), Float64(b / z)) / c);
	else
		tmp = t_2;
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / c), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t$95$1, -2e-6], t$95$2, If[LessEqual[t$95$1, 1e+99], N[(N[(-4.0 * N[(a * t), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$2]]]]
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
t_2 := \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z}\\
\mathbf{if}\;t\_1 \leq -2 \cdot 10^{-6}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq 10^{+99}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.9999999999999999e-6 or 9.9999999999999997e98 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 79.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

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

      \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
    5. Step-by-step derivation
      1. lower-/.f64N/A

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

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      4. lower-*.f6460.5%

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
    6. Applied rewrites60.5%

      \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
    7. Step-by-step derivation
      1. lift-+.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      2. lift-*.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      3. lift-*.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      4. *-commutativeN/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(y \cdot x\right)}{c}}{z} \]
      5. *-commutativeN/A

        \[\leadsto \frac{\frac{b + \left(y \cdot x\right) \cdot 9}{c}}{z} \]
      6. +-commutativeN/A

        \[\leadsto \frac{\frac{\left(y \cdot x\right) \cdot 9 + b}{c}}{z} \]
      7. *-commutativeN/A

        \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\frac{\left(x \cdot y\right) \cdot 9 + b}{c}}{z} \]
      9. lower-fma.f6460.5%

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c}}{z} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
      12. lower-*.f6460.5%

        \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]
    8. Applied rewrites60.5%

      \[\leadsto \frac{\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c}}{z} \]

    if -1.9999999999999999e-6 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999997e98

    1. Initial program 79.4%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      3. add-flipN/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y + \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      7. associate--l+N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}}{z \cdot c} \]
      8. div-addN/A

        \[\leadsto \color{blue}{\frac{\left(x \cdot 9\right) \cdot y}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}} \]
      9. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y}}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{z \cdot c}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{c \cdot z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      12. times-fracN/A

        \[\leadsto \color{blue}{\frac{x \cdot 9}{c} \cdot \frac{y}{z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x \cdot 9}{c}, \frac{y}{z}, \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}\right)} \]
    3. Applied rewrites71.4%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + \frac{b}{c \cdot z}} \]
    5. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      5. lower-*.f6463.1%

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
    6. Applied rewrites63.1%

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

      \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{\color{blue}{c}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c} \]
      2. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
      4. lower-/.f6463.7%

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
    9. Applied rewrites63.7%

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

Alternative 10: 74.5% accurate, 0.5× speedup?

\[\begin{array}{l} t_1 := \mathsf{min}\left(x, y\right) \cdot 9\\ t_2 := t\_1 \cdot \mathsf{max}\left(x, y\right)\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+128}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right) \cdot \frac{t\_1}{c}}{z}\\ \mathbf{elif}\;t\_2 \leq 10^{+99}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{min}\left(x, y\right) \cdot \frac{\mathsf{max}\left(x, y\right) \cdot 9}{z \cdot c}\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* (fmin x y) 9.0)) (t_2 (* t_1 (fmax x y))))
   (if (<= t_2 -5e+128)
     (/ (* (fmax x y) (/ t_1 c)) z)
     (if (<= t_2 1e+99)
       (/ (fma -4.0 (* a t) (/ b z)) c)
       (* (fmin x y) (/ (* (fmax x y) 9.0) (* z c)))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = fmin(x, y) * 9.0;
	double t_2 = t_1 * fmax(x, y);
	double tmp;
	if (t_2 <= -5e+128) {
		tmp = (fmax(x, y) * (t_1 / c)) / z;
	} else if (t_2 <= 1e+99) {
		tmp = fma(-4.0, (a * t), (b / z)) / c;
	} else {
		tmp = fmin(x, y) * ((fmax(x, y) * 9.0) / (z * c));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	t_1 = Float64(fmin(x, y) * 9.0)
	t_2 = Float64(t_1 * fmax(x, y))
	tmp = 0.0
	if (t_2 <= -5e+128)
		tmp = Float64(Float64(fmax(x, y) * Float64(t_1 / c)) / z);
	elseif (t_2 <= 1e+99)
		tmp = Float64(fma(-4.0, Float64(a * t), Float64(b / z)) / c);
	else
		tmp = Float64(fmin(x, y) * Float64(Float64(fmax(x, y) * 9.0) / Float64(z * c)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[Min[x, y], $MachinePrecision] * 9.0), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+128], N[(N[(N[Max[x, y], $MachinePrecision] * N[(t$95$1 / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 1e+99], N[(N[(-4.0 * N[(a * t), $MachinePrecision] + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], N[(N[Min[x, y], $MachinePrecision] * N[(N[(N[Max[x, y], $MachinePrecision] * 9.0), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
\begin{array}{l}
t_1 := \mathsf{min}\left(x, y\right) \cdot 9\\
t_2 := t\_1 \cdot \mathsf{max}\left(x, y\right)\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+128}:\\
\;\;\;\;\frac{\mathsf{max}\left(x, y\right) \cdot \frac{t\_1}{c}}{z}\\

\mathbf{elif}\;t\_2 \leq 10^{+99}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c}\\

\mathbf{else}:\\
\;\;\;\;\mathsf{min}\left(x, y\right) \cdot \frac{\mathsf{max}\left(x, y\right) \cdot 9}{z \cdot c}\\


\end{array}
Derivation
  1. Split input into 3 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5e128

    1. Initial program 79.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

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

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

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

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

        \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
      4. lower-*.f6435.6%

        \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot \color{blue}{z}} \]
    6. Applied rewrites35.6%

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

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

        \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c \cdot z}} \]
      3. associate-*r/N/A

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

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

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

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{c \cdot z} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{c \cdot \color{blue}{z}} \]
      8. times-fracN/A

        \[\leadsto \frac{9 \cdot x}{c} \cdot \color{blue}{\frac{y}{z}} \]
      9. lift-/.f64N/A

        \[\leadsto \frac{9 \cdot x}{c} \cdot \frac{\color{blue}{y}}{z} \]
      10. associate-/l*N/A

        \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot y}{\color{blue}{z}} \]
      11. lower-/.f64N/A

        \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot y}{\color{blue}{z}} \]
      12. *-commutativeN/A

        \[\leadsto \frac{y \cdot \frac{9 \cdot x}{c}}{z} \]
      13. lower-*.f6436.8%

        \[\leadsto \frac{y \cdot \frac{9 \cdot x}{c}}{z} \]
      14. lift-*.f64N/A

        \[\leadsto \frac{y \cdot \frac{9 \cdot x}{c}}{z} \]
      15. *-commutativeN/A

        \[\leadsto \frac{y \cdot \frac{x \cdot 9}{c}}{z} \]
      16. lower-*.f6436.8%

        \[\leadsto \frac{y \cdot \frac{x \cdot 9}{c}}{z} \]
    8. Applied rewrites36.8%

      \[\leadsto \frac{y \cdot \frac{x \cdot 9}{c}}{\color{blue}{z}} \]

    if -5e128 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999997e98

    1. Initial program 79.4%

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

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      3. add-flipN/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\color{blue}{\left(\left(x \cdot 9\right) \cdot y + \left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a\right)} - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      7. associate--l+N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y + \left(\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)\right)}}{z \cdot c} \]
      8. div-addN/A

        \[\leadsto \color{blue}{\frac{\left(x \cdot 9\right) \cdot y}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}} \]
      9. lift-*.f64N/A

        \[\leadsto \frac{\color{blue}{\left(x \cdot 9\right) \cdot y}}{z \cdot c} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      10. lift-*.f64N/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{z \cdot c}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      11. *-commutativeN/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{\color{blue}{c \cdot z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      12. times-fracN/A

        \[\leadsto \color{blue}{\frac{x \cdot 9}{c} \cdot \frac{y}{z}} + \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c} \]
      13. lower-fma.f64N/A

        \[\leadsto \color{blue}{\mathsf{fma}\left(\frac{x \cdot 9}{c}, \frac{y}{z}, \frac{\left(\mathsf{neg}\left(\left(z \cdot 4\right) \cdot t\right)\right) \cdot a - \left(\mathsf{neg}\left(b\right)\right)}{z \cdot c}\right)} \]
    3. Applied rewrites71.4%

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

      \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c} + \frac{b}{c \cdot z}} \]
    5. Step-by-step derivation
      1. lower-fma.f64N/A

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

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

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      4. lower-/.f64N/A

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
      5. lower-*.f6463.1%

        \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z}\right) \]
    6. Applied rewrites63.1%

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

      \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{\color{blue}{c}} \]
    8. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \frac{b}{z}}{c} \]
      2. lower-fma.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
      4. lower-/.f6463.7%

        \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{c} \]
    9. Applied rewrites63.7%

      \[\leadsto \frac{\mathsf{fma}\left(-4, a \cdot t, \frac{b}{z}\right)}{\color{blue}{c}} \]

    if 9.9999999999999997e98 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 79.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

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

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

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

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

        \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
      4. lower-*.f6435.6%

        \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot \color{blue}{z}} \]
    6. Applied rewrites35.6%

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

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

        \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c \cdot z}} \]
      3. associate-*r/N/A

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

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

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

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{c \cdot z} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{c \cdot z} \]
      8. *-commutativeN/A

        \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{c \cdot z} \]
      9. associate-*l*N/A

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

        \[\leadsto x \cdot \color{blue}{\frac{9 \cdot y}{c \cdot z}} \]
      11. lower-*.f64N/A

        \[\leadsto x \cdot \color{blue}{\frac{9 \cdot y}{c \cdot z}} \]
      12. lower-/.f64N/A

        \[\leadsto x \cdot \frac{9 \cdot y}{\color{blue}{c \cdot z}} \]
      13. *-commutativeN/A

        \[\leadsto x \cdot \frac{y \cdot 9}{\color{blue}{c} \cdot z} \]
      14. lower-*.f6437.6%

        \[\leadsto x \cdot \frac{y \cdot 9}{\color{blue}{c} \cdot z} \]
      15. lift-*.f64N/A

        \[\leadsto x \cdot \frac{y \cdot 9}{c \cdot \color{blue}{z}} \]
      16. *-commutativeN/A

        \[\leadsto x \cdot \frac{y \cdot 9}{z \cdot \color{blue}{c}} \]
      17. lower-*.f6437.6%

        \[\leadsto x \cdot \frac{y \cdot 9}{z \cdot \color{blue}{c}} \]
    8. Applied rewrites37.6%

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

Alternative 11: 53.8% accurate, 0.3× speedup?

\[\begin{array}{l} t_1 := \mathsf{min}\left(x, y\right) \cdot 9\\ t_2 := t\_1 \cdot \mathsf{max}\left(x, y\right)\\ t_3 := \mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\right)\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+69}:\\ \;\;\;\;\frac{\mathsf{max}\left(x, y\right) \cdot \frac{t\_1}{c}}{z}\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-160}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-301}:\\ \;\;\;\;\frac{\frac{1}{\frac{c}{b}}}{z}\\ \mathbf{elif}\;t\_2 \leq 10^{+99}:\\ \;\;\;\;t\_3\\ \mathbf{else}:\\ \;\;\;\;\mathsf{min}\left(x, y\right) \cdot \frac{\mathsf{max}\left(x, y\right) \cdot 9}{z \cdot c}\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* (fmin x y) 9.0))
        (t_2 (* t_1 (fmax x y)))
        (t_3 (* (fmax t a) (* -4.0 (/ (fmin t a) c)))))
   (if (<= t_2 -1e+69)
     (/ (* (fmax x y) (/ t_1 c)) z)
     (if (<= t_2 -5e-160)
       t_3
       (if (<= t_2 -2e-301)
         (/ (/ 1.0 (/ c b)) z)
         (if (<= t_2 1e+99)
           t_3
           (* (fmin x y) (/ (* (fmax x y) 9.0) (* z c)))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = fmin(x, y) * 9.0;
	double t_2 = t_1 * fmax(x, y);
	double t_3 = fmax(t, a) * (-4.0 * (fmin(t, a) / c));
	double tmp;
	if (t_2 <= -1e+69) {
		tmp = (fmax(x, y) * (t_1 / c)) / z;
	} else if (t_2 <= -5e-160) {
		tmp = t_3;
	} else if (t_2 <= -2e-301) {
		tmp = (1.0 / (c / b)) / z;
	} else if (t_2 <= 1e+99) {
		tmp = t_3;
	} else {
		tmp = fmin(x, y) * ((fmax(x, y) * 9.0) / (z * c));
	}
	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, b, c)
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), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: tmp
    t_1 = fmin(x, y) * 9.0d0
    t_2 = t_1 * fmax(x, y)
    t_3 = fmax(t, a) * ((-4.0d0) * (fmin(t, a) / c))
    if (t_2 <= (-1d+69)) then
        tmp = (fmax(x, y) * (t_1 / c)) / z
    else if (t_2 <= (-5d-160)) then
        tmp = t_3
    else if (t_2 <= (-2d-301)) then
        tmp = (1.0d0 / (c / b)) / z
    else if (t_2 <= 1d+99) then
        tmp = t_3
    else
        tmp = fmin(x, y) * ((fmax(x, y) * 9.0d0) / (z * c))
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = fmin(x, y) * 9.0;
	double t_2 = t_1 * fmax(x, y);
	double t_3 = fmax(t, a) * (-4.0 * (fmin(t, a) / c));
	double tmp;
	if (t_2 <= -1e+69) {
		tmp = (fmax(x, y) * (t_1 / c)) / z;
	} else if (t_2 <= -5e-160) {
		tmp = t_3;
	} else if (t_2 <= -2e-301) {
		tmp = (1.0 / (c / b)) / z;
	} else if (t_2 <= 1e+99) {
		tmp = t_3;
	} else {
		tmp = fmin(x, y) * ((fmax(x, y) * 9.0) / (z * c));
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = fmin(x, y) * 9.0
	t_2 = t_1 * fmax(x, y)
	t_3 = fmax(t, a) * (-4.0 * (fmin(t, a) / c))
	tmp = 0
	if t_2 <= -1e+69:
		tmp = (fmax(x, y) * (t_1 / c)) / z
	elif t_2 <= -5e-160:
		tmp = t_3
	elif t_2 <= -2e-301:
		tmp = (1.0 / (c / b)) / z
	elif t_2 <= 1e+99:
		tmp = t_3
	else:
		tmp = fmin(x, y) * ((fmax(x, y) * 9.0) / (z * c))
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(fmin(x, y) * 9.0)
	t_2 = Float64(t_1 * fmax(x, y))
	t_3 = Float64(fmax(t, a) * Float64(-4.0 * Float64(fmin(t, a) / c)))
	tmp = 0.0
	if (t_2 <= -1e+69)
		tmp = Float64(Float64(fmax(x, y) * Float64(t_1 / c)) / z);
	elseif (t_2 <= -5e-160)
		tmp = t_3;
	elseif (t_2 <= -2e-301)
		tmp = Float64(Float64(1.0 / Float64(c / b)) / z);
	elseif (t_2 <= 1e+99)
		tmp = t_3;
	else
		tmp = Float64(fmin(x, y) * Float64(Float64(fmax(x, y) * 9.0) / Float64(z * c)));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = min(x, y) * 9.0;
	t_2 = t_1 * max(x, y);
	t_3 = max(t, a) * (-4.0 * (min(t, a) / c));
	tmp = 0.0;
	if (t_2 <= -1e+69)
		tmp = (max(x, y) * (t_1 / c)) / z;
	elseif (t_2 <= -5e-160)
		tmp = t_3;
	elseif (t_2 <= -2e-301)
		tmp = (1.0 / (c / b)) / z;
	elseif (t_2 <= 1e+99)
		tmp = t_3;
	else
		tmp = min(x, y) * ((max(x, y) * 9.0) / (z * c));
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[Min[x, y], $MachinePrecision] * 9.0), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 * N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[Max[t, a], $MachinePrecision] * N[(-4.0 * N[(N[Min[t, a], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+69], N[(N[(N[Max[x, y], $MachinePrecision] * N[(t$95$1 / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, -5e-160], t$95$3, If[LessEqual[t$95$2, -2e-301], N[(N[(1.0 / N[(c / b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 1e+99], t$95$3, N[(N[Min[x, y], $MachinePrecision] * N[(N[(N[Max[x, y], $MachinePrecision] * 9.0), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]]
\begin{array}{l}
t_1 := \mathsf{min}\left(x, y\right) \cdot 9\\
t_2 := t\_1 \cdot \mathsf{max}\left(x, y\right)\\
t_3 := \mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\right)\\
\mathbf{if}\;t\_2 \leq -1 \cdot 10^{+69}:\\
\;\;\;\;\frac{\mathsf{max}\left(x, y\right) \cdot \frac{t\_1}{c}}{z}\\

\mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-160}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-301}:\\
\;\;\;\;\frac{\frac{1}{\frac{c}{b}}}{z}\\

\mathbf{elif}\;t\_2 \leq 10^{+99}:\\
\;\;\;\;t\_3\\

\mathbf{else}:\\
\;\;\;\;\mathsf{min}\left(x, y\right) \cdot \frac{\mathsf{max}\left(x, y\right) \cdot 9}{z \cdot c}\\


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.0000000000000001e69

    1. Initial program 79.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

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

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

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

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

        \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
      4. lower-*.f6435.6%

        \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot \color{blue}{z}} \]
    6. Applied rewrites35.6%

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

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

        \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c \cdot z}} \]
      3. associate-*r/N/A

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

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

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

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{c \cdot z} \]
      7. lift-*.f64N/A

        \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{c \cdot \color{blue}{z}} \]
      8. times-fracN/A

        \[\leadsto \frac{9 \cdot x}{c} \cdot \color{blue}{\frac{y}{z}} \]
      9. lift-/.f64N/A

        \[\leadsto \frac{9 \cdot x}{c} \cdot \frac{\color{blue}{y}}{z} \]
      10. associate-/l*N/A

        \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot y}{\color{blue}{z}} \]
      11. lower-/.f64N/A

        \[\leadsto \frac{\frac{9 \cdot x}{c} \cdot y}{\color{blue}{z}} \]
      12. *-commutativeN/A

        \[\leadsto \frac{y \cdot \frac{9 \cdot x}{c}}{z} \]
      13. lower-*.f6436.8%

        \[\leadsto \frac{y \cdot \frac{9 \cdot x}{c}}{z} \]
      14. lift-*.f64N/A

        \[\leadsto \frac{y \cdot \frac{9 \cdot x}{c}}{z} \]
      15. *-commutativeN/A

        \[\leadsto \frac{y \cdot \frac{x \cdot 9}{c}}{z} \]
      16. lower-*.f6436.8%

        \[\leadsto \frac{y \cdot \frac{x \cdot 9}{c}}{z} \]
    8. Applied rewrites36.8%

      \[\leadsto \frac{y \cdot \frac{x \cdot 9}{c}}{\color{blue}{z}} \]

    if -1.0000000000000001e69 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.9999999999999999e-160 or -2.0000000000000001e-301 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999997e98

    1. Initial program 79.4%

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

      \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

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

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

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

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
      5. lower-*.f64N/A

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
      6. lower-*.f64N/A

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
      7. lower-*.f64N/A

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
      8. lower-*.f6456.1%

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot \color{blue}{z}} \]
    4. Applied rewrites56.1%

      \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
    5. Taylor expanded in a around inf

      \[\leadsto a \cdot \color{blue}{\left(-4 \cdot \frac{t}{c} + 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right)} \]
    6. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c} + \color{blue}{9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}}\right) \]
      2. lower-fma.f64N/A

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

        \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
      4. lower-*.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
      5. lower-/.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
      6. lower-*.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
      7. lower-*.f64N/A

        \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
      8. lower-*.f6459.3%

        \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
    7. Applied rewrites59.3%

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

      \[\leadsto a \cdot \left(-4 \cdot \frac{t}{\color{blue}{c}}\right) \]
    9. Step-by-step derivation
      1. lower-*.f64N/A

        \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c}\right) \]
      2. lower-/.f6440.1%

        \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c}\right) \]
    10. Applied rewrites40.1%

      \[\leadsto a \cdot \left(-4 \cdot \frac{t}{\color{blue}{c}}\right) \]

    if -4.9999999999999999e-160 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.0000000000000001e-301

    1. Initial program 79.4%

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      5. lower-/.f64N/A

        \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
    3. Applied rewrites79.7%

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

      \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
    5. Step-by-step derivation
      1. lower-/.f64N/A

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

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      3. lower-*.f64N/A

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      4. lower-*.f6460.5%

        \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
    6. Applied rewrites60.5%

      \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
    7. Taylor expanded in x around 0

      \[\leadsto \frac{\frac{b}{c}}{z} \]
    8. Step-by-step derivation
      1. Applied rewrites34.8%

        \[\leadsto \frac{\frac{b}{c}}{z} \]
      2. Step-by-step derivation
        1. lift-/.f64N/A

          \[\leadsto \frac{\frac{b}{\color{blue}{c}}}{z} \]
        2. div-flipN/A

          \[\leadsto \frac{\frac{1}{\color{blue}{\frac{c}{b}}}}{z} \]
        3. lower-unsound-/.f64N/A

          \[\leadsto \frac{\frac{1}{\color{blue}{\frac{c}{b}}}}{z} \]
        4. lower-unsound-/.f6434.8%

          \[\leadsto \frac{\frac{1}{\frac{c}{\color{blue}{b}}}}{z} \]
      3. Applied rewrites34.8%

        \[\leadsto \frac{\frac{1}{\color{blue}{\frac{c}{b}}}}{z} \]

      if 9.9999999999999997e98 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

      1. Initial program 79.4%

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

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

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

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

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites79.7%

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

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

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

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

          \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
        4. lower-*.f6435.6%

          \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot \color{blue}{z}} \]
      6. Applied rewrites35.6%

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

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

          \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c \cdot z}} \]
        3. associate-*r/N/A

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

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

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

          \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{c \cdot z} \]
        7. lift-*.f64N/A

          \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{c \cdot z} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{c \cdot z} \]
        9. associate-*l*N/A

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

          \[\leadsto x \cdot \color{blue}{\frac{9 \cdot y}{c \cdot z}} \]
        11. lower-*.f64N/A

          \[\leadsto x \cdot \color{blue}{\frac{9 \cdot y}{c \cdot z}} \]
        12. lower-/.f64N/A

          \[\leadsto x \cdot \frac{9 \cdot y}{\color{blue}{c \cdot z}} \]
        13. *-commutativeN/A

          \[\leadsto x \cdot \frac{y \cdot 9}{\color{blue}{c} \cdot z} \]
        14. lower-*.f6437.6%

          \[\leadsto x \cdot \frac{y \cdot 9}{\color{blue}{c} \cdot z} \]
        15. lift-*.f64N/A

          \[\leadsto x \cdot \frac{y \cdot 9}{c \cdot \color{blue}{z}} \]
        16. *-commutativeN/A

          \[\leadsto x \cdot \frac{y \cdot 9}{z \cdot \color{blue}{c}} \]
        17. lower-*.f6437.6%

          \[\leadsto x \cdot \frac{y \cdot 9}{z \cdot \color{blue}{c}} \]
      8. Applied rewrites37.6%

        \[\leadsto x \cdot \color{blue}{\frac{y \cdot 9}{z \cdot c}} \]
    9. Recombined 4 regimes into one program.
    10. Add Preprocessing

    Alternative 12: 53.8% accurate, 0.6× speedup?

    \[\begin{array}{l} \mathbf{if}\;\mathsf{max}\left(t, a\right) \leq -1.65 \cdot 10^{-113}:\\ \;\;\;\;-4 \cdot \frac{\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)}{c}\\ \mathbf{elif}\;\mathsf{max}\left(t, a\right) \leq 2.4 \cdot 10^{-171}:\\ \;\;\;\;9 \cdot \frac{\mathsf{min}\left(x, y\right) \cdot \frac{\mathsf{max}\left(x, y\right)}{z}}{c}\\ \mathbf{elif}\;\mathsf{max}\left(t, a\right) \leq 2.8 \cdot 10^{-22}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{elif}\;\mathsf{max}\left(t, a\right) \leq 2 \cdot 10^{+180}:\\ \;\;\;\;\mathsf{min}\left(x, y\right) \cdot \frac{\mathsf{max}\left(x, y\right) \cdot 9}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\right)\\ \end{array} \]
    (FPCore (x y z t a b c)
     :precision binary64
     (if (<= (fmax t a) -1.65e-113)
       (* -4.0 (/ (* (fmax t a) (fmin t a)) c))
       (if (<= (fmax t a) 2.4e-171)
         (* 9.0 (/ (* (fmin x y) (/ (fmax x y) z)) c))
         (if (<= (fmax t a) 2.8e-22)
           (/ b (* c z))
           (if (<= (fmax t a) 2e+180)
             (* (fmin x y) (/ (* (fmax x y) 9.0) (* z c)))
             (* (fmax t a) (* -4.0 (/ (fmin t a) c))))))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (fmax(t, a) <= -1.65e-113) {
    		tmp = -4.0 * ((fmax(t, a) * fmin(t, a)) / c);
    	} else if (fmax(t, a) <= 2.4e-171) {
    		tmp = 9.0 * ((fmin(x, y) * (fmax(x, y) / z)) / c);
    	} else if (fmax(t, a) <= 2.8e-22) {
    		tmp = b / (c * z);
    	} else if (fmax(t, a) <= 2e+180) {
    		tmp = fmin(x, y) * ((fmax(x, y) * 9.0) / (z * c));
    	} else {
    		tmp = fmax(t, a) * (-4.0 * (fmin(t, a) / c));
    	}
    	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, b, c)
    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), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: tmp
        if (fmax(t, a) <= (-1.65d-113)) then
            tmp = (-4.0d0) * ((fmax(t, a) * fmin(t, a)) / c)
        else if (fmax(t, a) <= 2.4d-171) then
            tmp = 9.0d0 * ((fmin(x, y) * (fmax(x, y) / z)) / c)
        else if (fmax(t, a) <= 2.8d-22) then
            tmp = b / (c * z)
        else if (fmax(t, a) <= 2d+180) then
            tmp = fmin(x, y) * ((fmax(x, y) * 9.0d0) / (z * c))
        else
            tmp = fmax(t, a) * ((-4.0d0) * (fmin(t, a) / c))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (fmax(t, a) <= -1.65e-113) {
    		tmp = -4.0 * ((fmax(t, a) * fmin(t, a)) / c);
    	} else if (fmax(t, a) <= 2.4e-171) {
    		tmp = 9.0 * ((fmin(x, y) * (fmax(x, y) / z)) / c);
    	} else if (fmax(t, a) <= 2.8e-22) {
    		tmp = b / (c * z);
    	} else if (fmax(t, a) <= 2e+180) {
    		tmp = fmin(x, y) * ((fmax(x, y) * 9.0) / (z * c));
    	} else {
    		tmp = fmax(t, a) * (-4.0 * (fmin(t, a) / c));
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	tmp = 0
    	if fmax(t, a) <= -1.65e-113:
    		tmp = -4.0 * ((fmax(t, a) * fmin(t, a)) / c)
    	elif fmax(t, a) <= 2.4e-171:
    		tmp = 9.0 * ((fmin(x, y) * (fmax(x, y) / z)) / c)
    	elif fmax(t, a) <= 2.8e-22:
    		tmp = b / (c * z)
    	elif fmax(t, a) <= 2e+180:
    		tmp = fmin(x, y) * ((fmax(x, y) * 9.0) / (z * c))
    	else:
    		tmp = fmax(t, a) * (-4.0 * (fmin(t, a) / c))
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	tmp = 0.0
    	if (fmax(t, a) <= -1.65e-113)
    		tmp = Float64(-4.0 * Float64(Float64(fmax(t, a) * fmin(t, a)) / c));
    	elseif (fmax(t, a) <= 2.4e-171)
    		tmp = Float64(9.0 * Float64(Float64(fmin(x, y) * Float64(fmax(x, y) / z)) / c));
    	elseif (fmax(t, a) <= 2.8e-22)
    		tmp = Float64(b / Float64(c * z));
    	elseif (fmax(t, a) <= 2e+180)
    		tmp = Float64(fmin(x, y) * Float64(Float64(fmax(x, y) * 9.0) / Float64(z * c)));
    	else
    		tmp = Float64(fmax(t, a) * Float64(-4.0 * Float64(fmin(t, a) / c)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	tmp = 0.0;
    	if (max(t, a) <= -1.65e-113)
    		tmp = -4.0 * ((max(t, a) * min(t, a)) / c);
    	elseif (max(t, a) <= 2.4e-171)
    		tmp = 9.0 * ((min(x, y) * (max(x, y) / z)) / c);
    	elseif (max(t, a) <= 2.8e-22)
    		tmp = b / (c * z);
    	elseif (max(t, a) <= 2e+180)
    		tmp = min(x, y) * ((max(x, y) * 9.0) / (z * c));
    	else
    		tmp = max(t, a) * (-4.0 * (min(t, a) / c));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[N[Max[t, a], $MachinePrecision], -1.65e-113], N[(-4.0 * N[(N[(N[Max[t, a], $MachinePrecision] * N[Min[t, a], $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[t, a], $MachinePrecision], 2.4e-171], N[(9.0 * N[(N[(N[Min[x, y], $MachinePrecision] * N[(N[Max[x, y], $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[t, a], $MachinePrecision], 2.8e-22], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[N[Max[t, a], $MachinePrecision], 2e+180], N[(N[Min[x, y], $MachinePrecision] * N[(N[(N[Max[x, y], $MachinePrecision] * 9.0), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[Max[t, a], $MachinePrecision] * N[(-4.0 * N[(N[Min[t, a], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]
    
    \begin{array}{l}
    \mathbf{if}\;\mathsf{max}\left(t, a\right) \leq -1.65 \cdot 10^{-113}:\\
    \;\;\;\;-4 \cdot \frac{\mathsf{max}\left(t, a\right) \cdot \mathsf{min}\left(t, a\right)}{c}\\
    
    \mathbf{elif}\;\mathsf{max}\left(t, a\right) \leq 2.4 \cdot 10^{-171}:\\
    \;\;\;\;9 \cdot \frac{\mathsf{min}\left(x, y\right) \cdot \frac{\mathsf{max}\left(x, y\right)}{z}}{c}\\
    
    \mathbf{elif}\;\mathsf{max}\left(t, a\right) \leq 2.8 \cdot 10^{-22}:\\
    \;\;\;\;\frac{b}{c \cdot z}\\
    
    \mathbf{elif}\;\mathsf{max}\left(t, a\right) \leq 2 \cdot 10^{+180}:\\
    \;\;\;\;\mathsf{min}\left(x, y\right) \cdot \frac{\mathsf{max}\left(x, y\right) \cdot 9}{z \cdot c}\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 5 regimes
    2. if a < -1.6500000000000001e-113

      1. Initial program 79.4%

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

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
      3. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto -4 \cdot \color{blue}{\frac{a \cdot t}{c}} \]
        2. lower-/.f64N/A

          \[\leadsto -4 \cdot \frac{a \cdot t}{\color{blue}{c}} \]
        3. lower-*.f6438.5%

          \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. Applied rewrites38.5%

        \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

      if -1.6500000000000001e-113 < a < 2.3999999999999999e-171

      1. Initial program 79.4%

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

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

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

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

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites79.7%

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

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

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

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

          \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
        4. lower-*.f6435.6%

          \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot \color{blue}{z}} \]
      6. Applied rewrites35.6%

        \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
      7. Step-by-step derivation
        1. lift-/.f64N/A

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

          \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
        3. lift-*.f64N/A

          \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot \color{blue}{z}} \]
        4. times-fracN/A

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

          \[\leadsto 9 \cdot \frac{x \cdot \frac{y}{z}}{\color{blue}{c}} \]
        6. lower-/.f64N/A

          \[\leadsto 9 \cdot \frac{x \cdot \frac{y}{z}}{\color{blue}{c}} \]
        7. lower-*.f64N/A

          \[\leadsto 9 \cdot \frac{x \cdot \frac{y}{z}}{c} \]
        8. lower-/.f6435.1%

          \[\leadsto 9 \cdot \frac{x \cdot \frac{y}{z}}{c} \]
      8. Applied rewrites35.1%

        \[\leadsto 9 \cdot \frac{x \cdot \frac{y}{z}}{\color{blue}{c}} \]

      if 2.3999999999999999e-171 < a < 2.7999999999999999e-22

      1. Initial program 79.4%

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

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6435.6%

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites35.6%

        \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]

      if 2.7999999999999999e-22 < a < 2e180

      1. Initial program 79.4%

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

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

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

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

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites79.7%

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

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

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

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

          \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
        4. lower-*.f6435.6%

          \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot \color{blue}{z}} \]
      6. Applied rewrites35.6%

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

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

          \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c \cdot z}} \]
        3. associate-*r/N/A

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

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

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

          \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{c \cdot z} \]
        7. lift-*.f64N/A

          \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{c \cdot z} \]
        8. *-commutativeN/A

          \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{c \cdot z} \]
        9. associate-*l*N/A

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

          \[\leadsto x \cdot \color{blue}{\frac{9 \cdot y}{c \cdot z}} \]
        11. lower-*.f64N/A

          \[\leadsto x \cdot \color{blue}{\frac{9 \cdot y}{c \cdot z}} \]
        12. lower-/.f64N/A

          \[\leadsto x \cdot \frac{9 \cdot y}{\color{blue}{c \cdot z}} \]
        13. *-commutativeN/A

          \[\leadsto x \cdot \frac{y \cdot 9}{\color{blue}{c} \cdot z} \]
        14. lower-*.f6437.6%

          \[\leadsto x \cdot \frac{y \cdot 9}{\color{blue}{c} \cdot z} \]
        15. lift-*.f64N/A

          \[\leadsto x \cdot \frac{y \cdot 9}{c \cdot \color{blue}{z}} \]
        16. *-commutativeN/A

          \[\leadsto x \cdot \frac{y \cdot 9}{z \cdot \color{blue}{c}} \]
        17. lower-*.f6437.6%

          \[\leadsto x \cdot \frac{y \cdot 9}{z \cdot \color{blue}{c}} \]
      8. Applied rewrites37.6%

        \[\leadsto x \cdot \color{blue}{\frac{y \cdot 9}{z \cdot c}} \]

      if 2e180 < a

      1. Initial program 79.4%

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

        \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

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

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

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

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        5. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        7. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        8. lower-*.f6456.1%

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites56.1%

        \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
      5. Taylor expanded in a around inf

        \[\leadsto a \cdot \color{blue}{\left(-4 \cdot \frac{t}{c} + 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right)} \]
      6. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c} + \color{blue}{9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}}\right) \]
        2. lower-fma.f64N/A

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

          \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
        4. lower-*.f64N/A

          \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
        5. lower-/.f64N/A

          \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
        6. lower-*.f64N/A

          \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
        7. lower-*.f64N/A

          \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
        8. lower-*.f6459.3%

          \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
      7. Applied rewrites59.3%

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

        \[\leadsto a \cdot \left(-4 \cdot \frac{t}{\color{blue}{c}}\right) \]
      9. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c}\right) \]
        2. lower-/.f6440.1%

          \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c}\right) \]
      10. Applied rewrites40.1%

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

    Alternative 13: 53.7% accurate, 0.3× speedup?

    \[\begin{array}{l} t_1 := \left(\mathsf{min}\left(x, y\right) \cdot 9\right) \cdot \mathsf{max}\left(x, y\right)\\ t_2 := \mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\right)\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+69}:\\ \;\;\;\;9 \cdot \left(\mathsf{max}\left(x, y\right) \cdot \frac{\mathsf{min}\left(x, y\right)}{z \cdot c}\right)\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-160}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-301}:\\ \;\;\;\;\frac{\frac{1}{\frac{c}{b}}}{z}\\ \mathbf{elif}\;t\_1 \leq 10^{+99}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\mathsf{min}\left(x, y\right) \cdot \frac{\mathsf{max}\left(x, y\right) \cdot 9}{z \cdot c}\\ \end{array} \]
    (FPCore (x y z t a b c)
     :precision binary64
     (let* ((t_1 (* (* (fmin x y) 9.0) (fmax x y)))
            (t_2 (* (fmax t a) (* -4.0 (/ (fmin t a) c)))))
       (if (<= t_1 -1e+69)
         (* 9.0 (* (fmax x y) (/ (fmin x y) (* z c))))
         (if (<= t_1 -5e-160)
           t_2
           (if (<= t_1 -2e-301)
             (/ (/ 1.0 (/ c b)) z)
             (if (<= t_1 1e+99)
               t_2
               (* (fmin x y) (/ (* (fmax x y) 9.0) (* z c)))))))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (fmin(x, y) * 9.0) * fmax(x, y);
    	double t_2 = fmax(t, a) * (-4.0 * (fmin(t, a) / c));
    	double tmp;
    	if (t_1 <= -1e+69) {
    		tmp = 9.0 * (fmax(x, y) * (fmin(x, y) / (z * c)));
    	} else if (t_1 <= -5e-160) {
    		tmp = t_2;
    	} else if (t_1 <= -2e-301) {
    		tmp = (1.0 / (c / b)) / z;
    	} else if (t_1 <= 1e+99) {
    		tmp = t_2;
    	} else {
    		tmp = fmin(x, y) * ((fmax(x, y) * 9.0) / (z * c));
    	}
    	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, b, c)
    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), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: tmp
        t_1 = (fmin(x, y) * 9.0d0) * fmax(x, y)
        t_2 = fmax(t, a) * ((-4.0d0) * (fmin(t, a) / c))
        if (t_1 <= (-1d+69)) then
            tmp = 9.0d0 * (fmax(x, y) * (fmin(x, y) / (z * c)))
        else if (t_1 <= (-5d-160)) then
            tmp = t_2
        else if (t_1 <= (-2d-301)) then
            tmp = (1.0d0 / (c / b)) / z
        else if (t_1 <= 1d+99) then
            tmp = t_2
        else
            tmp = fmin(x, y) * ((fmax(x, y) * 9.0d0) / (z * c))
        end if
        code = tmp
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (fmin(x, y) * 9.0) * fmax(x, y);
    	double t_2 = fmax(t, a) * (-4.0 * (fmin(t, a) / c));
    	double tmp;
    	if (t_1 <= -1e+69) {
    		tmp = 9.0 * (fmax(x, y) * (fmin(x, y) / (z * c)));
    	} else if (t_1 <= -5e-160) {
    		tmp = t_2;
    	} else if (t_1 <= -2e-301) {
    		tmp = (1.0 / (c / b)) / z;
    	} else if (t_1 <= 1e+99) {
    		tmp = t_2;
    	} else {
    		tmp = fmin(x, y) * ((fmax(x, y) * 9.0) / (z * c));
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	t_1 = (fmin(x, y) * 9.0) * fmax(x, y)
    	t_2 = fmax(t, a) * (-4.0 * (fmin(t, a) / c))
    	tmp = 0
    	if t_1 <= -1e+69:
    		tmp = 9.0 * (fmax(x, y) * (fmin(x, y) / (z * c)))
    	elif t_1 <= -5e-160:
    		tmp = t_2
    	elif t_1 <= -2e-301:
    		tmp = (1.0 / (c / b)) / z
    	elif t_1 <= 1e+99:
    		tmp = t_2
    	else:
    		tmp = fmin(x, y) * ((fmax(x, y) * 9.0) / (z * c))
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(Float64(fmin(x, y) * 9.0) * fmax(x, y))
    	t_2 = Float64(fmax(t, a) * Float64(-4.0 * Float64(fmin(t, a) / c)))
    	tmp = 0.0
    	if (t_1 <= -1e+69)
    		tmp = Float64(9.0 * Float64(fmax(x, y) * Float64(fmin(x, y) / Float64(z * c))));
    	elseif (t_1 <= -5e-160)
    		tmp = t_2;
    	elseif (t_1 <= -2e-301)
    		tmp = Float64(Float64(1.0 / Float64(c / b)) / z);
    	elseif (t_1 <= 1e+99)
    		tmp = t_2;
    	else
    		tmp = Float64(fmin(x, y) * Float64(Float64(fmax(x, y) * 9.0) / Float64(z * c)));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	t_1 = (min(x, y) * 9.0) * max(x, y);
    	t_2 = max(t, a) * (-4.0 * (min(t, a) / c));
    	tmp = 0.0;
    	if (t_1 <= -1e+69)
    		tmp = 9.0 * (max(x, y) * (min(x, y) / (z * c)));
    	elseif (t_1 <= -5e-160)
    		tmp = t_2;
    	elseif (t_1 <= -2e-301)
    		tmp = (1.0 / (c / b)) / z;
    	elseif (t_1 <= 1e+99)
    		tmp = t_2;
    	else
    		tmp = min(x, y) * ((max(x, y) * 9.0) / (z * c));
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[Min[x, y], $MachinePrecision] * 9.0), $MachinePrecision] * N[Max[x, y], $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[Max[t, a], $MachinePrecision] * N[(-4.0 * N[(N[Min[t, a], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+69], N[(9.0 * N[(N[Max[x, y], $MachinePrecision] * N[(N[Min[x, y], $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, -5e-160], t$95$2, If[LessEqual[t$95$1, -2e-301], N[(N[(1.0 / N[(c / b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$1, 1e+99], t$95$2, N[(N[Min[x, y], $MachinePrecision] * N[(N[(N[Max[x, y], $MachinePrecision] * 9.0), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]]]]
    
    \begin{array}{l}
    t_1 := \left(\mathsf{min}\left(x, y\right) \cdot 9\right) \cdot \mathsf{max}\left(x, y\right)\\
    t_2 := \mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\right)\\
    \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+69}:\\
    \;\;\;\;9 \cdot \left(\mathsf{max}\left(x, y\right) \cdot \frac{\mathsf{min}\left(x, y\right)}{z \cdot c}\right)\\
    
    \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{-160}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-301}:\\
    \;\;\;\;\frac{\frac{1}{\frac{c}{b}}}{z}\\
    
    \mathbf{elif}\;t\_1 \leq 10^{+99}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{else}:\\
    \;\;\;\;\mathsf{min}\left(x, y\right) \cdot \frac{\mathsf{max}\left(x, y\right) \cdot 9}{z \cdot c}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.0000000000000001e69

      1. Initial program 79.4%

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

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

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

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

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites79.7%

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

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

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

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

          \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
        4. lower-*.f6435.6%

          \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot \color{blue}{z}} \]
      6. Applied rewrites35.6%

        \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
      7. Step-by-step derivation
        1. lift-/.f64N/A

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

          \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
        3. *-commutativeN/A

          \[\leadsto 9 \cdot \frac{y \cdot x}{\color{blue}{c} \cdot z} \]
        4. associate-/l*N/A

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

          \[\leadsto 9 \cdot \left(y \cdot \color{blue}{\frac{x}{c \cdot z}}\right) \]
        6. lower-/.f6437.6%

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

          \[\leadsto 9 \cdot \left(y \cdot \frac{x}{c \cdot \color{blue}{z}}\right) \]
        8. *-commutativeN/A

          \[\leadsto 9 \cdot \left(y \cdot \frac{x}{z \cdot \color{blue}{c}}\right) \]
        9. lower-*.f6437.6%

          \[\leadsto 9 \cdot \left(y \cdot \frac{x}{z \cdot \color{blue}{c}}\right) \]
      8. Applied rewrites37.6%

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

      if -1.0000000000000001e69 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.9999999999999999e-160 or -2.0000000000000001e-301 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999997e98

      1. Initial program 79.4%

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

        \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

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

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

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

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        5. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        6. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        7. lower-*.f64N/A

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
        8. lower-*.f6456.1%

          \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites56.1%

        \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
      5. Taylor expanded in a around inf

        \[\leadsto a \cdot \color{blue}{\left(-4 \cdot \frac{t}{c} + 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right)} \]
      6. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c} + \color{blue}{9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}}\right) \]
        2. lower-fma.f64N/A

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

          \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
        4. lower-*.f64N/A

          \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
        5. lower-/.f64N/A

          \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
        6. lower-*.f64N/A

          \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
        7. lower-*.f64N/A

          \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
        8. lower-*.f6459.3%

          \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
      7. Applied rewrites59.3%

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

        \[\leadsto a \cdot \left(-4 \cdot \frac{t}{\color{blue}{c}}\right) \]
      9. Step-by-step derivation
        1. lower-*.f64N/A

          \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c}\right) \]
        2. lower-/.f6440.1%

          \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c}\right) \]
      10. Applied rewrites40.1%

        \[\leadsto a \cdot \left(-4 \cdot \frac{t}{\color{blue}{c}}\right) \]

      if -4.9999999999999999e-160 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.0000000000000001e-301

      1. Initial program 79.4%

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

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

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

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

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        5. lower-/.f64N/A

          \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
      3. Applied rewrites79.7%

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

        \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
      5. Step-by-step derivation
        1. lower-/.f64N/A

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

          \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
        3. lower-*.f64N/A

          \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
        4. lower-*.f6460.5%

          \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
      6. Applied rewrites60.5%

        \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
      7. Taylor expanded in x around 0

        \[\leadsto \frac{\frac{b}{c}}{z} \]
      8. Step-by-step derivation
        1. Applied rewrites34.8%

          \[\leadsto \frac{\frac{b}{c}}{z} \]
        2. Step-by-step derivation
          1. lift-/.f64N/A

            \[\leadsto \frac{\frac{b}{\color{blue}{c}}}{z} \]
          2. div-flipN/A

            \[\leadsto \frac{\frac{1}{\color{blue}{\frac{c}{b}}}}{z} \]
          3. lower-unsound-/.f64N/A

            \[\leadsto \frac{\frac{1}{\color{blue}{\frac{c}{b}}}}{z} \]
          4. lower-unsound-/.f6434.8%

            \[\leadsto \frac{\frac{1}{\frac{c}{\color{blue}{b}}}}{z} \]
        3. Applied rewrites34.8%

          \[\leadsto \frac{\frac{1}{\color{blue}{\frac{c}{b}}}}{z} \]

        if 9.9999999999999997e98 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

        1. Initial program 79.4%

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

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

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

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

            \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
          5. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        3. Applied rewrites79.7%

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

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

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

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

            \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
          4. lower-*.f6435.6%

            \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot \color{blue}{z}} \]
        6. Applied rewrites35.6%

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

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

            \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c \cdot z}} \]
          3. associate-*r/N/A

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

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

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

            \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{c \cdot z} \]
          7. lift-*.f64N/A

            \[\leadsto \frac{\left(9 \cdot x\right) \cdot y}{c \cdot z} \]
          8. *-commutativeN/A

            \[\leadsto \frac{\left(x \cdot 9\right) \cdot y}{c \cdot z} \]
          9. associate-*l*N/A

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

            \[\leadsto x \cdot \color{blue}{\frac{9 \cdot y}{c \cdot z}} \]
          11. lower-*.f64N/A

            \[\leadsto x \cdot \color{blue}{\frac{9 \cdot y}{c \cdot z}} \]
          12. lower-/.f64N/A

            \[\leadsto x \cdot \frac{9 \cdot y}{\color{blue}{c \cdot z}} \]
          13. *-commutativeN/A

            \[\leadsto x \cdot \frac{y \cdot 9}{\color{blue}{c} \cdot z} \]
          14. lower-*.f6437.6%

            \[\leadsto x \cdot \frac{y \cdot 9}{\color{blue}{c} \cdot z} \]
          15. lift-*.f64N/A

            \[\leadsto x \cdot \frac{y \cdot 9}{c \cdot \color{blue}{z}} \]
          16. *-commutativeN/A

            \[\leadsto x \cdot \frac{y \cdot 9}{z \cdot \color{blue}{c}} \]
          17. lower-*.f6437.6%

            \[\leadsto x \cdot \frac{y \cdot 9}{z \cdot \color{blue}{c}} \]
        8. Applied rewrites37.6%

          \[\leadsto x \cdot \color{blue}{\frac{y \cdot 9}{z \cdot c}} \]
      9. Recombined 4 regimes into one program.
      10. Add Preprocessing

      Alternative 14: 51.8% accurate, 0.5× speedup?

      \[\begin{array}{l} t_1 := \mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\right)\\ t_2 := \left(x \cdot 9\right) \cdot y\\ t_3 := 9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\ \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+69}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-160}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-301}:\\ \;\;\;\;\frac{\frac{1}{\frac{c}{b}}}{z}\\ \mathbf{elif}\;t\_2 \leq 10^{+99}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \]
      (FPCore (x y z t a b c)
       :precision binary64
       (let* ((t_1 (* (fmax t a) (* -4.0 (/ (fmin t a) c))))
              (t_2 (* (* x 9.0) y))
              (t_3 (* 9.0 (* y (/ x (* z c))))))
         (if (<= t_2 -1e+69)
           t_3
           (if (<= t_2 -5e-160)
             t_1
             (if (<= t_2 -2e-301)
               (/ (/ 1.0 (/ c b)) z)
               (if (<= t_2 1e+99) t_1 t_3))))))
      double code(double x, double y, double z, double t, double a, double b, double c) {
      	double t_1 = fmax(t, a) * (-4.0 * (fmin(t, a) / c));
      	double t_2 = (x * 9.0) * y;
      	double t_3 = 9.0 * (y * (x / (z * c)));
      	double tmp;
      	if (t_2 <= -1e+69) {
      		tmp = t_3;
      	} else if (t_2 <= -5e-160) {
      		tmp = t_1;
      	} else if (t_2 <= -2e-301) {
      		tmp = (1.0 / (c / b)) / z;
      	} else if (t_2 <= 1e+99) {
      		tmp = t_1;
      	} else {
      		tmp = t_3;
      	}
      	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, b, c)
      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), intent (in) :: b
          real(8), intent (in) :: c
          real(8) :: t_1
          real(8) :: t_2
          real(8) :: t_3
          real(8) :: tmp
          t_1 = fmax(t, a) * ((-4.0d0) * (fmin(t, a) / c))
          t_2 = (x * 9.0d0) * y
          t_3 = 9.0d0 * (y * (x / (z * c)))
          if (t_2 <= (-1d+69)) then
              tmp = t_3
          else if (t_2 <= (-5d-160)) then
              tmp = t_1
          else if (t_2 <= (-2d-301)) then
              tmp = (1.0d0 / (c / b)) / z
          else if (t_2 <= 1d+99) then
              tmp = t_1
          else
              tmp = t_3
          end if
          code = tmp
      end function
      
      public static double code(double x, double y, double z, double t, double a, double b, double c) {
      	double t_1 = fmax(t, a) * (-4.0 * (fmin(t, a) / c));
      	double t_2 = (x * 9.0) * y;
      	double t_3 = 9.0 * (y * (x / (z * c)));
      	double tmp;
      	if (t_2 <= -1e+69) {
      		tmp = t_3;
      	} else if (t_2 <= -5e-160) {
      		tmp = t_1;
      	} else if (t_2 <= -2e-301) {
      		tmp = (1.0 / (c / b)) / z;
      	} else if (t_2 <= 1e+99) {
      		tmp = t_1;
      	} else {
      		tmp = t_3;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b, c):
      	t_1 = fmax(t, a) * (-4.0 * (fmin(t, a) / c))
      	t_2 = (x * 9.0) * y
      	t_3 = 9.0 * (y * (x / (z * c)))
      	tmp = 0
      	if t_2 <= -1e+69:
      		tmp = t_3
      	elif t_2 <= -5e-160:
      		tmp = t_1
      	elif t_2 <= -2e-301:
      		tmp = (1.0 / (c / b)) / z
      	elif t_2 <= 1e+99:
      		tmp = t_1
      	else:
      		tmp = t_3
      	return tmp
      
      function code(x, y, z, t, a, b, c)
      	t_1 = Float64(fmax(t, a) * Float64(-4.0 * Float64(fmin(t, a) / c)))
      	t_2 = Float64(Float64(x * 9.0) * y)
      	t_3 = Float64(9.0 * Float64(y * Float64(x / Float64(z * c))))
      	tmp = 0.0
      	if (t_2 <= -1e+69)
      		tmp = t_3;
      	elseif (t_2 <= -5e-160)
      		tmp = t_1;
      	elseif (t_2 <= -2e-301)
      		tmp = Float64(Float64(1.0 / Float64(c / b)) / z);
      	elseif (t_2 <= 1e+99)
      		tmp = t_1;
      	else
      		tmp = t_3;
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b, c)
      	t_1 = max(t, a) * (-4.0 * (min(t, a) / c));
      	t_2 = (x * 9.0) * y;
      	t_3 = 9.0 * (y * (x / (z * c)));
      	tmp = 0.0;
      	if (t_2 <= -1e+69)
      		tmp = t_3;
      	elseif (t_2 <= -5e-160)
      		tmp = t_1;
      	elseif (t_2 <= -2e-301)
      		tmp = (1.0 / (c / b)) / z;
      	elseif (t_2 <= 1e+99)
      		tmp = t_1;
      	else
      		tmp = t_3;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[Max[t, a], $MachinePrecision] * N[(-4.0 * N[(N[Min[t, a], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$3 = N[(9.0 * N[(y * N[(x / N[(z * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e+69], t$95$3, If[LessEqual[t$95$2, -5e-160], t$95$1, If[LessEqual[t$95$2, -2e-301], N[(N[(1.0 / N[(c / b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 1e+99], t$95$1, t$95$3]]]]]]]
      
      \begin{array}{l}
      t_1 := \mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\right)\\
      t_2 := \left(x \cdot 9\right) \cdot y\\
      t_3 := 9 \cdot \left(y \cdot \frac{x}{z \cdot c}\right)\\
      \mathbf{if}\;t\_2 \leq -1 \cdot 10^{+69}:\\
      \;\;\;\;t\_3\\
      
      \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-160}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-301}:\\
      \;\;\;\;\frac{\frac{1}{\frac{c}{b}}}{z}\\
      
      \mathbf{elif}\;t\_2 \leq 10^{+99}:\\
      \;\;\;\;t\_1\\
      
      \mathbf{else}:\\
      \;\;\;\;t\_3\\
      
      
      \end{array}
      
      Derivation
      1. Split input into 3 regimes
      2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.0000000000000001e69 or 9.9999999999999997e98 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

        1. Initial program 79.4%

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

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

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

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

            \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
          5. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        3. Applied rewrites79.7%

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

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

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

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

            \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
          4. lower-*.f6435.6%

            \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot \color{blue}{z}} \]
        6. Applied rewrites35.6%

          \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
        7. Step-by-step derivation
          1. lift-/.f64N/A

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

            \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
          3. *-commutativeN/A

            \[\leadsto 9 \cdot \frac{y \cdot x}{\color{blue}{c} \cdot z} \]
          4. associate-/l*N/A

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

            \[\leadsto 9 \cdot \left(y \cdot \color{blue}{\frac{x}{c \cdot z}}\right) \]
          6. lower-/.f6437.6%

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

            \[\leadsto 9 \cdot \left(y \cdot \frac{x}{c \cdot \color{blue}{z}}\right) \]
          8. *-commutativeN/A

            \[\leadsto 9 \cdot \left(y \cdot \frac{x}{z \cdot \color{blue}{c}}\right) \]
          9. lower-*.f6437.6%

            \[\leadsto 9 \cdot \left(y \cdot \frac{x}{z \cdot \color{blue}{c}}\right) \]
        8. Applied rewrites37.6%

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

        if -1.0000000000000001e69 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.9999999999999999e-160 or -2.0000000000000001e-301 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999997e98

        1. Initial program 79.4%

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

          \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
        3. Step-by-step derivation
          1. lower-/.f64N/A

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

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

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

            \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
          5. lower-*.f64N/A

            \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
          6. lower-*.f64N/A

            \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
          7. lower-*.f64N/A

            \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
          8. lower-*.f6456.1%

            \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot \color{blue}{z}} \]
        4. Applied rewrites56.1%

          \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
        5. Taylor expanded in a around inf

          \[\leadsto a \cdot \color{blue}{\left(-4 \cdot \frac{t}{c} + 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right)} \]
        6. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c} + \color{blue}{9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}}\right) \]
          2. lower-fma.f64N/A

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

            \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
          4. lower-*.f64N/A

            \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
          5. lower-/.f64N/A

            \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
          6. lower-*.f64N/A

            \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
          7. lower-*.f64N/A

            \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
          8. lower-*.f6459.3%

            \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
        7. Applied rewrites59.3%

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

          \[\leadsto a \cdot \left(-4 \cdot \frac{t}{\color{blue}{c}}\right) \]
        9. Step-by-step derivation
          1. lower-*.f64N/A

            \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c}\right) \]
          2. lower-/.f6440.1%

            \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c}\right) \]
        10. Applied rewrites40.1%

          \[\leadsto a \cdot \left(-4 \cdot \frac{t}{\color{blue}{c}}\right) \]

        if -4.9999999999999999e-160 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.0000000000000001e-301

        1. Initial program 79.4%

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

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

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

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

            \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
          5. lower-/.f64N/A

            \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
        3. Applied rewrites79.7%

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

          \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
        5. Step-by-step derivation
          1. lower-/.f64N/A

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

            \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
          3. lower-*.f64N/A

            \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
          4. lower-*.f6460.5%

            \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
        6. Applied rewrites60.5%

          \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
        7. Taylor expanded in x around 0

          \[\leadsto \frac{\frac{b}{c}}{z} \]
        8. Step-by-step derivation
          1. Applied rewrites34.8%

            \[\leadsto \frac{\frac{b}{c}}{z} \]
          2. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \frac{\frac{b}{\color{blue}{c}}}{z} \]
            2. div-flipN/A

              \[\leadsto \frac{\frac{1}{\color{blue}{\frac{c}{b}}}}{z} \]
            3. lower-unsound-/.f64N/A

              \[\leadsto \frac{\frac{1}{\color{blue}{\frac{c}{b}}}}{z} \]
            4. lower-unsound-/.f6434.8%

              \[\leadsto \frac{\frac{1}{\frac{c}{\color{blue}{b}}}}{z} \]
          3. Applied rewrites34.8%

            \[\leadsto \frac{\frac{1}{\color{blue}{\frac{c}{b}}}}{z} \]
        9. Recombined 3 regimes into one program.
        10. Add Preprocessing

        Alternative 15: 50.0% accurate, 0.5× speedup?

        \[\begin{array}{l} t_1 := a \cdot \left(-4 \cdot \frac{t}{c}\right)\\ t_2 := \left(x \cdot 9\right) \cdot y\\ t_3 := 9 \cdot \frac{x \cdot y}{c \cdot z}\\ \mathbf{if}\;t\_2 \leq -1000000000000:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-160}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-301}:\\ \;\;\;\;\frac{\frac{1}{\frac{c}{b}}}{z}\\ \mathbf{elif}\;t\_2 \leq 10^{+99}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \]
        (FPCore (x y z t a b c)
         :precision binary64
         (let* ((t_1 (* a (* -4.0 (/ t c))))
                (t_2 (* (* x 9.0) y))
                (t_3 (* 9.0 (/ (* x y) (* c z)))))
           (if (<= t_2 -1000000000000.0)
             t_3
             (if (<= t_2 -5e-160)
               t_1
               (if (<= t_2 -2e-301)
                 (/ (/ 1.0 (/ c b)) z)
                 (if (<= t_2 1e+99) t_1 t_3))))))
        double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = a * (-4.0 * (t / c));
        	double t_2 = (x * 9.0) * y;
        	double t_3 = 9.0 * ((x * y) / (c * z));
        	double tmp;
        	if (t_2 <= -1000000000000.0) {
        		tmp = t_3;
        	} else if (t_2 <= -5e-160) {
        		tmp = t_1;
        	} else if (t_2 <= -2e-301) {
        		tmp = (1.0 / (c / b)) / z;
        	} else if (t_2 <= 1e+99) {
        		tmp = t_1;
        	} else {
        		tmp = t_3;
        	}
        	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, b, c)
        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), intent (in) :: b
            real(8), intent (in) :: c
            real(8) :: t_1
            real(8) :: t_2
            real(8) :: t_3
            real(8) :: tmp
            t_1 = a * ((-4.0d0) * (t / c))
            t_2 = (x * 9.0d0) * y
            t_3 = 9.0d0 * ((x * y) / (c * z))
            if (t_2 <= (-1000000000000.0d0)) then
                tmp = t_3
            else if (t_2 <= (-5d-160)) then
                tmp = t_1
            else if (t_2 <= (-2d-301)) then
                tmp = (1.0d0 / (c / b)) / z
            else if (t_2 <= 1d+99) then
                tmp = t_1
            else
                tmp = t_3
            end if
            code = tmp
        end function
        
        public static double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = a * (-4.0 * (t / c));
        	double t_2 = (x * 9.0) * y;
        	double t_3 = 9.0 * ((x * y) / (c * z));
        	double tmp;
        	if (t_2 <= -1000000000000.0) {
        		tmp = t_3;
        	} else if (t_2 <= -5e-160) {
        		tmp = t_1;
        	} else if (t_2 <= -2e-301) {
        		tmp = (1.0 / (c / b)) / z;
        	} else if (t_2 <= 1e+99) {
        		tmp = t_1;
        	} else {
        		tmp = t_3;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b, c):
        	t_1 = a * (-4.0 * (t / c))
        	t_2 = (x * 9.0) * y
        	t_3 = 9.0 * ((x * y) / (c * z))
        	tmp = 0
        	if t_2 <= -1000000000000.0:
        		tmp = t_3
        	elif t_2 <= -5e-160:
        		tmp = t_1
        	elif t_2 <= -2e-301:
        		tmp = (1.0 / (c / b)) / z
        	elif t_2 <= 1e+99:
        		tmp = t_1
        	else:
        		tmp = t_3
        	return tmp
        
        function code(x, y, z, t, a, b, c)
        	t_1 = Float64(a * Float64(-4.0 * Float64(t / c)))
        	t_2 = Float64(Float64(x * 9.0) * y)
        	t_3 = Float64(9.0 * Float64(Float64(x * y) / Float64(c * z)))
        	tmp = 0.0
        	if (t_2 <= -1000000000000.0)
        		tmp = t_3;
        	elseif (t_2 <= -5e-160)
        		tmp = t_1;
        	elseif (t_2 <= -2e-301)
        		tmp = Float64(Float64(1.0 / Float64(c / b)) / z);
        	elseif (t_2 <= 1e+99)
        		tmp = t_1;
        	else
        		tmp = t_3;
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b, c)
        	t_1 = a * (-4.0 * (t / c));
        	t_2 = (x * 9.0) * y;
        	t_3 = 9.0 * ((x * y) / (c * z));
        	tmp = 0.0;
        	if (t_2 <= -1000000000000.0)
        		tmp = t_3;
        	elseif (t_2 <= -5e-160)
        		tmp = t_1;
        	elseif (t_2 <= -2e-301)
        		tmp = (1.0 / (c / b)) / z;
        	elseif (t_2 <= 1e+99)
        		tmp = t_1;
        	else
        		tmp = t_3;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(a * N[(-4.0 * N[(t / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$3 = N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1000000000000.0], t$95$3, If[LessEqual[t$95$2, -5e-160], t$95$1, If[LessEqual[t$95$2, -2e-301], N[(N[(1.0 / N[(c / b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision], If[LessEqual[t$95$2, 1e+99], t$95$1, t$95$3]]]]]]]
        
        \begin{array}{l}
        t_1 := a \cdot \left(-4 \cdot \frac{t}{c}\right)\\
        t_2 := \left(x \cdot 9\right) \cdot y\\
        t_3 := 9 \cdot \frac{x \cdot y}{c \cdot z}\\
        \mathbf{if}\;t\_2 \leq -1000000000000:\\
        \;\;\;\;t\_3\\
        
        \mathbf{elif}\;t\_2 \leq -5 \cdot 10^{-160}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{elif}\;t\_2 \leq -2 \cdot 10^{-301}:\\
        \;\;\;\;\frac{\frac{1}{\frac{c}{b}}}{z}\\
        
        \mathbf{elif}\;t\_2 \leq 10^{+99}:\\
        \;\;\;\;t\_1\\
        
        \mathbf{else}:\\
        \;\;\;\;t\_3\\
        
        
        \end{array}
        
        Derivation
        1. Split input into 3 regimes
        2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1e12 or 9.9999999999999997e98 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

          1. Initial program 79.4%

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

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

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

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

              \[\leadsto 9 \cdot \frac{x \cdot y}{\color{blue}{c} \cdot z} \]
            4. lower-*.f6435.6%

              \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot \color{blue}{z}} \]
          4. Applied rewrites35.6%

            \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]

          if -1e12 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -4.9999999999999999e-160 or -2.0000000000000001e-301 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999997e98

          1. Initial program 79.4%

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

            \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

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

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

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

              \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
            5. lower-*.f64N/A

              \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
            6. lower-*.f64N/A

              \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
            7. lower-*.f64N/A

              \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
            8. lower-*.f6456.1%

              \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot \color{blue}{z}} \]
          4. Applied rewrites56.1%

            \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
          5. Taylor expanded in a around inf

            \[\leadsto a \cdot \color{blue}{\left(-4 \cdot \frac{t}{c} + 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right)} \]
          6. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c} + \color{blue}{9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}}\right) \]
            2. lower-fma.f64N/A

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

              \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
            4. lower-*.f64N/A

              \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
            5. lower-/.f64N/A

              \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
            6. lower-*.f64N/A

              \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
            7. lower-*.f64N/A

              \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
            8. lower-*.f6459.3%

              \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
          7. Applied rewrites59.3%

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

            \[\leadsto a \cdot \left(-4 \cdot \frac{t}{\color{blue}{c}}\right) \]
          9. Step-by-step derivation
            1. lower-*.f64N/A

              \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c}\right) \]
            2. lower-/.f6440.1%

              \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c}\right) \]
          10. Applied rewrites40.1%

            \[\leadsto a \cdot \left(-4 \cdot \frac{t}{\color{blue}{c}}\right) \]

          if -4.9999999999999999e-160 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -2.0000000000000001e-301

          1. Initial program 79.4%

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

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

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

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

              \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
            5. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{c}}{z}} \]
          3. Applied rewrites79.7%

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

            \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
          5. Step-by-step derivation
            1. lower-/.f64N/A

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

              \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
            3. lower-*.f64N/A

              \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
            4. lower-*.f6460.5%

              \[\leadsto \frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z} \]
          6. Applied rewrites60.5%

            \[\leadsto \frac{\color{blue}{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}}{z} \]
          7. Taylor expanded in x around 0

            \[\leadsto \frac{\frac{b}{c}}{z} \]
          8. Step-by-step derivation
            1. Applied rewrites34.8%

              \[\leadsto \frac{\frac{b}{c}}{z} \]
            2. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \frac{\frac{b}{\color{blue}{c}}}{z} \]
              2. div-flipN/A

                \[\leadsto \frac{\frac{1}{\color{blue}{\frac{c}{b}}}}{z} \]
              3. lower-unsound-/.f64N/A

                \[\leadsto \frac{\frac{1}{\color{blue}{\frac{c}{b}}}}{z} \]
              4. lower-unsound-/.f6434.8%

                \[\leadsto \frac{\frac{1}{\frac{c}{\color{blue}{b}}}}{z} \]
            3. Applied rewrites34.8%

              \[\leadsto \frac{\frac{1}{\color{blue}{\frac{c}{b}}}}{z} \]
          9. Recombined 3 regimes into one program.
          10. Add Preprocessing

          Alternative 16: 47.7% accurate, 0.9× speedup?

          \[\begin{array}{l} t_1 := \mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\right)\\ \mathbf{if}\;\mathsf{max}\left(t, a\right) \leq -7.5 \cdot 10^{-50}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;\mathsf{max}\left(t, a\right) \leq 1.26 \cdot 10^{-36}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \]
          (FPCore (x y z t a b c)
           :precision binary64
           (let* ((t_1 (* (fmax t a) (* -4.0 (/ (fmin t a) c)))))
             (if (<= (fmax t a) -7.5e-50)
               t_1
               (if (<= (fmax t a) 1.26e-36) (/ b (* c z)) t_1))))
          double code(double x, double y, double z, double t, double a, double b, double c) {
          	double t_1 = fmax(t, a) * (-4.0 * (fmin(t, a) / c));
          	double tmp;
          	if (fmax(t, a) <= -7.5e-50) {
          		tmp = t_1;
          	} else if (fmax(t, a) <= 1.26e-36) {
          		tmp = b / (c * z);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          module fmin_fmax_functions
              implicit none
              private
              public fmax
              public fmin
          
              interface fmax
                  module procedure fmax88
                  module procedure fmax44
                  module procedure fmax84
                  module procedure fmax48
              end interface
              interface fmin
                  module procedure fmin88
                  module procedure fmin44
                  module procedure fmin84
                  module procedure fmin48
              end interface
          contains
              real(8) function fmax88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(4) function fmax44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, max(x, y), y /= y), x /= x)
              end function
              real(8) function fmax84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmax48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
              end function
              real(8) function fmin88(x, y) result (res)
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(4) function fmin44(x, y) result (res)
                  real(4), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(y, merge(x, min(x, y), y /= y), x /= x)
              end function
              real(8) function fmin84(x, y) result(res)
                  real(8), intent (in) :: x
                  real(4), intent (in) :: y
                  res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
              end function
              real(8) function fmin48(x, y) result(res)
                  real(4), intent (in) :: x
                  real(8), intent (in) :: y
                  res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
              end function
          end module
          
          real(8) function code(x, y, z, t, a, b, c)
          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), intent (in) :: b
              real(8), intent (in) :: c
              real(8) :: t_1
              real(8) :: tmp
              t_1 = fmax(t, a) * ((-4.0d0) * (fmin(t, a) / c))
              if (fmax(t, a) <= (-7.5d-50)) then
                  tmp = t_1
              else if (fmax(t, a) <= 1.26d-36) then
                  tmp = b / (c * z)
              else
                  tmp = t_1
              end if
              code = tmp
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b, double c) {
          	double t_1 = fmax(t, a) * (-4.0 * (fmin(t, a) / c));
          	double tmp;
          	if (fmax(t, a) <= -7.5e-50) {
          		tmp = t_1;
          	} else if (fmax(t, a) <= 1.26e-36) {
          		tmp = b / (c * z);
          	} else {
          		tmp = t_1;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b, c):
          	t_1 = fmax(t, a) * (-4.0 * (fmin(t, a) / c))
          	tmp = 0
          	if fmax(t, a) <= -7.5e-50:
          		tmp = t_1
          	elif fmax(t, a) <= 1.26e-36:
          		tmp = b / (c * z)
          	else:
          		tmp = t_1
          	return tmp
          
          function code(x, y, z, t, a, b, c)
          	t_1 = Float64(fmax(t, a) * Float64(-4.0 * Float64(fmin(t, a) / c)))
          	tmp = 0.0
          	if (fmax(t, a) <= -7.5e-50)
          		tmp = t_1;
          	elseif (fmax(t, a) <= 1.26e-36)
          		tmp = Float64(b / Float64(c * z));
          	else
          		tmp = t_1;
          	end
          	return tmp
          end
          
          function tmp_2 = code(x, y, z, t, a, b, c)
          	t_1 = max(t, a) * (-4.0 * (min(t, a) / c));
          	tmp = 0.0;
          	if (max(t, a) <= -7.5e-50)
          		tmp = t_1;
          	elseif (max(t, a) <= 1.26e-36)
          		tmp = b / (c * z);
          	else
          		tmp = t_1;
          	end
          	tmp_2 = tmp;
          end
          
          code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[Max[t, a], $MachinePrecision] * N[(-4.0 * N[(N[Min[t, a], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[N[Max[t, a], $MachinePrecision], -7.5e-50], t$95$1, If[LessEqual[N[Max[t, a], $MachinePrecision], 1.26e-36], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], t$95$1]]]
          
          \begin{array}{l}
          t_1 := \mathsf{max}\left(t, a\right) \cdot \left(-4 \cdot \frac{\mathsf{min}\left(t, a\right)}{c}\right)\\
          \mathbf{if}\;\mathsf{max}\left(t, a\right) \leq -7.5 \cdot 10^{-50}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;\mathsf{max}\left(t, a\right) \leq 1.26 \cdot 10^{-36}:\\
          \;\;\;\;\frac{b}{c \cdot z}\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_1\\
          
          
          \end{array}
          
          Derivation
          1. Split input into 2 regimes
          2. if a < -7.5e-50 or 1.26e-36 < a

            1. Initial program 79.4%

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

              \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
            3. Step-by-step derivation
              1. lower-/.f64N/A

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

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

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

                \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
              5. lower-*.f64N/A

                \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
              6. lower-*.f64N/A

                \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
              7. lower-*.f64N/A

                \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z} \]
              8. lower-*.f6456.1%

                \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot \color{blue}{z}} \]
            4. Applied rewrites56.1%

              \[\leadsto \color{blue}{\frac{9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)}{c \cdot z}} \]
            5. Taylor expanded in a around inf

              \[\leadsto a \cdot \color{blue}{\left(-4 \cdot \frac{t}{c} + 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right)} \]
            6. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c} + \color{blue}{9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}}\right) \]
              2. lower-fma.f64N/A

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

                \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
              4. lower-*.f64N/A

                \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
              5. lower-/.f64N/A

                \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
              6. lower-*.f64N/A

                \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
              7. lower-*.f64N/A

                \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
              8. lower-*.f6459.3%

                \[\leadsto a \cdot \mathsf{fma}\left(-4, \frac{t}{c}, 9 \cdot \frac{x \cdot y}{a \cdot \left(c \cdot z\right)}\right) \]
            7. Applied rewrites59.3%

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

              \[\leadsto a \cdot \left(-4 \cdot \frac{t}{\color{blue}{c}}\right) \]
            9. Step-by-step derivation
              1. lower-*.f64N/A

                \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c}\right) \]
              2. lower-/.f6440.1%

                \[\leadsto a \cdot \left(-4 \cdot \frac{t}{c}\right) \]
            10. Applied rewrites40.1%

              \[\leadsto a \cdot \left(-4 \cdot \frac{t}{\color{blue}{c}}\right) \]

            if -7.5e-50 < a < 1.26e-36

            1. Initial program 79.4%

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

              \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
            3. Step-by-step derivation
              1. lower-/.f64N/A

                \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
              2. lower-*.f6435.6%

                \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
            4. Applied rewrites35.6%

              \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
          3. Recombined 2 regimes into one program.
          4. Add Preprocessing

          Alternative 17: 35.6% accurate, 3.8× speedup?

          \[\frac{b}{c \cdot z} \]
          (FPCore (x y z t a b c) :precision binary64 (/ b (* c z)))
          double code(double x, double y, double z, double t, double a, double b, double c) {
          	return b / (c * z);
          }
          
          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, b, c)
          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), intent (in) :: b
              real(8), intent (in) :: c
              code = b / (c * z)
          end function
          
          public static double code(double x, double y, double z, double t, double a, double b, double c) {
          	return b / (c * z);
          }
          
          def code(x, y, z, t, a, b, c):
          	return b / (c * z)
          
          function code(x, y, z, t, a, b, c)
          	return Float64(b / Float64(c * z))
          end
          
          function tmp = code(x, y, z, t, a, b, c)
          	tmp = b / (c * z);
          end
          
          code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]
          
          \frac{b}{c \cdot z}
          
          Derivation
          1. Initial program 79.4%

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

            \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
          3. Step-by-step derivation
            1. lower-/.f64N/A

              \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
            2. lower-*.f6435.6%

              \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
          4. Applied rewrites35.6%

            \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
          5. Add Preprocessing

          Reproduce

          ?
          herbie shell --seed 2025191 
          (FPCore (x y z t a b c)
            :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, J"
            :precision binary64
            (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))