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

Percentage Accurate: 79.3% → 89.8%
Time: 5.4s
Alternatives: 19
Speedup: 0.6×

Specification

?
\[\begin{array}{l} \\ \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} \end{array} \]
(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]
\begin{array}{l}

\\
\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}
\end{array}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 19 alternatives:

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

Initial Program: 79.3% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \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} \end{array} \]
(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]
\begin{array}{l}

\\
\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}
\end{array}

Alternative 1: 89.8% accurate, 0.4× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;-\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\

\mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-15}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{fma}\left(x \cdot y, 9, b\right), \frac{1}{z}, \left(a \cdot t\right) \cdot -4\right)}{c}\\

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

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


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

    1. Initial program 59.1%

      \[\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}{-1 \cdot \left(x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right)\right)} \]
    3. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

        \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right) \cdot x \]
    4. Applied rewrites72.0%

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

      \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z}\right) \cdot x \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
      4. lift-*.f6481.2

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
    7. Applied rewrites81.2%

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

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

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

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

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
      5. lower-/.f6491.5

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
    9. Applied rewrites91.5%

      \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]

    if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.0000000000000002e-15

    1. Initial program 81.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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
      15. lift-*.f6490.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000002e-15 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.9999999999999999e185

    1. Initial program 83.8%

      \[\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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999999e185 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 73.2%

      \[\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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites71.6%

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

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

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

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

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

        \[\leadsto \frac{-\left(-9 \cdot \frac{y}{z} + -1 \cdot \frac{\frac{b}{z} - 4 \cdot \left(a \cdot t\right)}{x}\right) \cdot x}{c} \]
    6. Applied rewrites81.5%

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

Alternative 2: 89.8% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
t_2 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

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

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

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


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

    1. Initial program 63.7%

      \[\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}{-1 \cdot \left(x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right)\right)} \]
    3. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

        \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right) \cdot x \]
    4. Applied rewrites72.0%

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

      \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z}\right) \cdot x \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
      4. lift-*.f6481.3

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
    7. Applied rewrites81.3%

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

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

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

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

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
      5. lower-/.f6489.2

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
    9. Applied rewrites89.2%

      \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]

    if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.0000000000000002e-15

    1. Initial program 81.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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites81.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
      15. lift-*.f6490.4

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 2.0000000000000002e-15 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1e281

    1. Initial program 83.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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 89.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
t_2 := \mathsf{fma}\left(y \cdot x, 9, b\right)\\
t_3 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_3 \leq -\infty:\\
\;\;\;\;t\_1\\

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

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

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


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

    1. Initial program 63.7%

      \[\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}{-1 \cdot \left(x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right)\right)} \]
    3. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

        \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right) \cdot x \]
    4. Applied rewrites72.0%

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

      \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z}\right) \cdot x \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
      4. lift-*.f6481.3

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
    7. Applied rewrites81.3%

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

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

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

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

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
      5. lower-/.f6489.2

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
    9. Applied rewrites89.2%

      \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]

    if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.9999999999999998e-93

    1. Initial program 81.2%

      \[\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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites80.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
      15. lift-*.f6490.4

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

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

    if 1.9999999999999998e-93 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1e281

    1. Initial program 83.5%

      \[\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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 89.2% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
t_2 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_2 \leq -\infty:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -inf.0 or 1e281 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 63.7%

      \[\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}{-1 \cdot \left(x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right)\right)} \]
    3. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

        \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right) \cdot x \]
    4. Applied rewrites72.0%

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

      \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z}\right) \cdot x \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
      4. lift-*.f6481.3

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
    7. Applied rewrites81.3%

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

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

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

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

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
      5. lower-/.f6489.2

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
    9. Applied rewrites89.2%

      \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]

    if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1e281

    1. Initial program 81.9%

      \[\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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites80.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
      15. lift-*.f6489.9

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

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

Alternative 5: 78.4% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;-\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-72}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{x \cdot y}{z} \cdot 9\right)}{c}\\

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

\mathbf{else}:\\
\;\;\;\;-\frac{\frac{y}{c} \cdot -9 - \frac{b}{c \cdot x}}{z} \cdot x\\


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

    1. Initial program 59.1%

      \[\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}{-1 \cdot \left(x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right)\right)} \]
    3. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

        \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right) \cdot x \]
    4. Applied rewrites72.0%

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

      \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z}\right) \cdot x \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
      4. lift-*.f6481.2

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
    7. Applied rewrites81.2%

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

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

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

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

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
      5. lower-/.f6491.5

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
    9. Applied rewrites91.5%

      \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]

    if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.9999999999999999e-72

    1. Initial program 81.8%

      \[\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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
      15. lift-*.f6488.4

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

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

      \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, 9 \cdot \frac{x \cdot y}{z}\right)}{c} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

    if -1.9999999999999999e-72 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111

    1. Initial program 82.0%

      \[\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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites82.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
      15. lift-*.f6491.1

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

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

      \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z}\right)}{c} \]
    8. Step-by-step derivation
      1. lower-/.f6481.9

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

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

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

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

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

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

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

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

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

    if 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 75.3%

      \[\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}{-1 \cdot \left(x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right)\right)} \]
    3. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\frac{y}{c} \cdot -9 - \frac{b}{c \cdot x}}{z} \cdot x \]
      5. lower-/.f64N/A

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

        \[\leadsto -\frac{\frac{y}{c} \cdot -9 - \frac{b}{c \cdot x}}{z} \cdot x \]
      7. lower-*.f6472.9

        \[\leadsto -\frac{\frac{y}{c} \cdot -9 - \frac{b}{c \cdot x}}{z} \cdot x \]
    7. Applied rewrites72.9%

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

Alternative 6: 78.1% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;-\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-72}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{x \cdot y}{z} \cdot 9\right)}{c}\\

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

\mathbf{else}:\\
\;\;\;\;-\frac{\left(\frac{y}{c} \cdot -9 - \frac{b}{c \cdot x}\right) \cdot x}{z}\\


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

    1. Initial program 59.1%

      \[\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}{-1 \cdot \left(x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right)\right)} \]
    3. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

        \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right) \cdot x \]
    4. Applied rewrites72.0%

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

      \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z}\right) \cdot x \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
      4. lift-*.f6481.2

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
    7. Applied rewrites81.2%

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

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

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

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

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
      5. lower-/.f6491.5

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
    9. Applied rewrites91.5%

      \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]

    if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.9999999999999999e-72

    1. Initial program 81.8%

      \[\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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
      15. lift-*.f6488.4

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

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

      \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, 9 \cdot \frac{x \cdot y}{z}\right)}{c} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

    if -1.9999999999999999e-72 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 4.00000000000000036e25

    1. Initial program 81.5%

      \[\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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites82.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
      15. lift-*.f6491.3

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

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

      \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z}\right)}{c} \]
    8. Step-by-step derivation
      1. lower-/.f6485.1

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

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

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

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

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

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

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

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

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

    if 4.00000000000000036e25 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 77.9%

      \[\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}{-1 \cdot \left(x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right)\right)} \]
    3. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

        \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right) \cdot x \]
    4. Applied rewrites72.5%

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

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

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

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

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

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

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

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

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

        \[\leadsto -\frac{\left(\frac{y}{c} \cdot -9 - \frac{b}{c \cdot x}\right) \cdot x}{z} \]
      9. lower-*.f6468.2

        \[\leadsto -\frac{\left(\frac{y}{c} \cdot -9 - \frac{b}{c \cdot x}\right) \cdot x}{z} \]
    7. Applied rewrites68.2%

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

Alternative 7: 77.6% accurate, 0.6× speedup?

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

\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
\mathbf{if}\;t\_1 \leq -\infty:\\
\;\;\;\;-\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\

\mathbf{elif}\;t\_1 \leq -2 \cdot 10^{-72}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{x \cdot y}{z} \cdot 9\right)}{c}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 1}{c \cdot \frac{z}{y}} \cdot 9\\


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

    1. Initial program 59.1%

      \[\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}{-1 \cdot \left(x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right)\right)} \]
    3. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

        \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right) \cdot x \]
    4. Applied rewrites72.0%

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

      \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z}\right) \cdot x \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
      4. lift-*.f6481.2

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
    7. Applied rewrites81.2%

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

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

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

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

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
      5. lower-/.f6491.5

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
    9. Applied rewrites91.5%

      \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]

    if -inf.0 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1.9999999999999999e-72

    1. Initial program 81.8%

      \[\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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites79.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
      15. lift-*.f6488.4

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

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

      \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, 9 \cdot \frac{x \cdot y}{z}\right)}{c} \]
    8. Step-by-step derivation
      1. *-commutativeN/A

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

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

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

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

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

    if -1.9999999999999999e-72 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111

    1. Initial program 82.0%

      \[\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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites82.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
      15. lift-*.f6491.1

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

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

      \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z}\right)}{c} \]
    8. Step-by-step derivation
      1. lower-/.f6481.9

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

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

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

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

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

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

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

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

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

    if 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 75.3%

      \[\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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
      15. lift-*.f6479.3

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

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

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

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

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

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

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

        \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
      6. associate-+l-N/A

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

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

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

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

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

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

        \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
      13. lift-*.f6467.5

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot 1}{c \cdot \frac{z}{y}} \cdot 9 \]
      8. lower-/.f64N/A

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

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

        \[\leadsto \frac{x \cdot 1}{c \cdot \frac{z}{y}} \cdot 9 \]
      11. lower-/.f6468.7

        \[\leadsto \frac{x \cdot 1}{c \cdot \frac{z}{y}} \cdot 9 \]
    11. Applied rewrites68.7%

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

Alternative 8: 77.3% accurate, 0.6× speedup?

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

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

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+25}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c}\\

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

\mathbf{else}:\\
\;\;\;\;\frac{x \cdot 1}{c \cdot \frac{z}{y}} \cdot 9\\


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

    1. Initial program 62.6%

      \[\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}{-1 \cdot \left(x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right)\right)} \]
    3. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

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

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

      \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z}\right) \cdot x \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
      4. lift-*.f6479.1

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
    7. Applied rewrites79.1%

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

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

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

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

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
      5. lower-/.f6487.6

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
    9. Applied rewrites87.6%

      \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]

    if -5.0000000000000003e275 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000024e25

    1. Initial program 81.8%

      \[\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 0

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

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

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

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

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

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

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

    if -5.00000000000000024e25 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111

    1. Initial program 82.0%

      \[\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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites82.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
      15. lift-*.f6491.1

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

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

      \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z}\right)}{c} \]
    8. Step-by-step derivation
      1. lower-/.f6480.6

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

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

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

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

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

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

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

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

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

    if 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    1. Initial program 75.3%

      \[\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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
      15. lift-*.f6479.3

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

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

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

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

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

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

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

        \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
      6. associate-+l-N/A

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

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

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

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

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

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

        \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
      13. lift-*.f6467.5

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

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

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

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

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

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

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

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

        \[\leadsto \frac{x \cdot 1}{c \cdot \frac{z}{y}} \cdot 9 \]
      8. lower-/.f64N/A

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

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

        \[\leadsto \frac{x \cdot 1}{c \cdot \frac{z}{y}} \cdot 9 \]
      11. lower-/.f6468.7

        \[\leadsto \frac{x \cdot 1}{c \cdot \frac{z}{y}} \cdot 9 \]
    11. Applied rewrites68.7%

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

Alternative 9: 76.9% accurate, 0.6× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\ \mathbf{if}\;t\_1 \leq -5 \cdot 10^{+275}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+25}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+111}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-4 \cdot a, t, \frac{b}{z}\right)}{c}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* (* x 9.0) y)) (t_2 (- (* (* (/ (/ y c) z) -9.0) x))))
   (if (<= t_1 -5e+275)
     t_2
     (if (<= t_1 -5e+25)
       (/ (fma (* y x) 9.0 b) (* z c))
       (if (<= t_1 2e+111) (/ (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 = -((((y / c) / z) * -9.0) * x);
	double tmp;
	if (t_1 <= -5e+275) {
		tmp = t_2;
	} else if (t_1 <= -5e+25) {
		tmp = fma((y * x), 9.0, b) / (z * c);
	} else if (t_1 <= 2e+111) {
		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(Float64(Float64(Float64(y / c) / z) * -9.0) * x))
	tmp = 0.0
	if (t_1 <= -5e+275)
		tmp = t_2;
	elseif (t_1 <= -5e+25)
		tmp = Float64(fma(Float64(y * x), 9.0, b) / Float64(z * c));
	elseif (t_1 <= 2e+111)
		tmp = Float64(fma(Float64(-4.0 * 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 / c), $MachinePrecision] / z), $MachinePrecision] * -9.0), $MachinePrecision] * x), $MachinePrecision])}, If[LessEqual[t$95$1, -5e+275], t$95$2, If[LessEqual[t$95$1, -5e+25], N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+111], N[(N[(N[(-4.0 * a), $MachinePrecision] * t + N[(b / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], t$95$2]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(x \cdot 9\right) \cdot y\\
t_2 := -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
\mathbf{if}\;t\_1 \leq -5 \cdot 10^{+275}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;t\_1 \leq -5 \cdot 10^{+25}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c}\\

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

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


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

    1. Initial program 71.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}{-1 \cdot \left(x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right)\right)} \]
    3. Step-by-step derivation
      1. mul-1-negN/A

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

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

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

        \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right) \cdot x \]
    4. Applied rewrites72.8%

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

      \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z}\right) \cdot x \]
    6. Step-by-step derivation
      1. *-commutativeN/A

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

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

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
      4. lift-*.f6471.0

        \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
    7. Applied rewrites71.0%

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

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

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

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

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
      5. lower-/.f6475.9

        \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
    9. Applied rewrites75.9%

      \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]

    if -5.0000000000000003e275 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000024e25

    1. Initial program 81.8%

      \[\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 0

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

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

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

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

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

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

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

    if -5.00000000000000024e25 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111

    1. Initial program 82.0%

      \[\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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites82.1%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
      15. lift-*.f6491.1

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

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

      \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z}\right)}{c} \]
    8. Step-by-step derivation
      1. lower-/.f6480.6

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

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

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

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

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

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

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

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

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

Alternative 10: 67.3% accurate, 1.2× speedup?

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

\\
\begin{array}{l}
\mathbf{if}\;z \leq -2.6 \cdot 10^{+207}:\\
\;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\

\mathbf{elif}\;z \leq 2.7 \cdot 10^{+103}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c}\\

\mathbf{else}:\\
\;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\


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

    1. Initial program 46.5%

      \[\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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      2. *-commutativeN/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      3. *-commutativeN/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. associate-*l*N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      5. lift-*.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      6. lift-*.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      7. *-commutativeN/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      8. associate--r-N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      9. lift-*.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      10. lift-*.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      11. associate-/l/N/A

        \[\leadsto \color{blue}{-4} \cdot \frac{a \cdot t}{c} \]
      12. *-commutativeN/A

        \[\leadsto \frac{a \cdot t}{c} \cdot \color{blue}{-4} \]
    7. Applied rewrites65.8%

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

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

        \[\leadsto \frac{a \cdot t}{c} \cdot -4 \]
      3. associate-/l*N/A

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

        \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
      5. lower-/.f6466.3

        \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
    9. Applied rewrites66.3%

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

    if -2.5999999999999998e207 < z < 2.69999999999999993e103

    1. Initial program 88.6%

      \[\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 0

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

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

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

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

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

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

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

    if 2.69999999999999993e103 < z

    1. Initial program 54.8%

      \[\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-*.f6460.6

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

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

Alternative 11: 54.6% accurate, 0.5× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a \cdot \frac{t}{c}\right) \cdot -4\\ t_2 := \left(x \cdot 9\right) \cdot y\\ t_3 := \left(x \cdot \frac{\frac{y}{c}}{z}\right) \cdot 9\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+25}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-230}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+111}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* (* a (/ t c)) -4.0))
        (t_2 (* (* x 9.0) y))
        (t_3 (* (* x (/ (/ y c) z)) 9.0)))
   (if (<= t_2 -5e+25)
     t_3
     (if (<= t_2 -1e-98)
       t_1
       (if (<= t_2 5e-230) (/ (/ b z) c) (if (<= t_2 2e+111) t_1 t_3))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (a * (t / c)) * -4.0;
	double t_2 = (x * 9.0) * y;
	double t_3 = (x * ((y / c) / z)) * 9.0;
	double tmp;
	if (t_2 <= -5e+25) {
		tmp = t_3;
	} else if (t_2 <= -1e-98) {
		tmp = t_1;
	} else if (t_2 <= 5e-230) {
		tmp = (b / z) / c;
	} else if (t_2 <= 2e+111) {
		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 * (t / c)) * (-4.0d0)
    t_2 = (x * 9.0d0) * y
    t_3 = (x * ((y / c) / z)) * 9.0d0
    if (t_2 <= (-5d+25)) then
        tmp = t_3
    else if (t_2 <= (-1d-98)) then
        tmp = t_1
    else if (t_2 <= 5d-230) then
        tmp = (b / z) / c
    else if (t_2 <= 2d+111) 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 * (t / c)) * -4.0;
	double t_2 = (x * 9.0) * y;
	double t_3 = (x * ((y / c) / z)) * 9.0;
	double tmp;
	if (t_2 <= -5e+25) {
		tmp = t_3;
	} else if (t_2 <= -1e-98) {
		tmp = t_1;
	} else if (t_2 <= 5e-230) {
		tmp = (b / z) / c;
	} else if (t_2 <= 2e+111) {
		tmp = t_1;
	} else {
		tmp = t_3;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = (a * (t / c)) * -4.0
	t_2 = (x * 9.0) * y
	t_3 = (x * ((y / c) / z)) * 9.0
	tmp = 0
	if t_2 <= -5e+25:
		tmp = t_3
	elif t_2 <= -1e-98:
		tmp = t_1
	elif t_2 <= 5e-230:
		tmp = (b / z) / c
	elif t_2 <= 2e+111:
		tmp = t_1
	else:
		tmp = t_3
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(a * Float64(t / c)) * -4.0)
	t_2 = Float64(Float64(x * 9.0) * y)
	t_3 = Float64(Float64(x * Float64(Float64(y / c) / z)) * 9.0)
	tmp = 0.0
	if (t_2 <= -5e+25)
		tmp = t_3;
	elseif (t_2 <= -1e-98)
		tmp = t_1;
	elseif (t_2 <= 5e-230)
		tmp = Float64(Float64(b / z) / c);
	elseif (t_2 <= 2e+111)
		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 * (t / c)) * -4.0;
	t_2 = (x * 9.0) * y;
	t_3 = (x * ((y / c) / z)) * 9.0;
	tmp = 0.0;
	if (t_2 <= -5e+25)
		tmp = t_3;
	elseif (t_2 <= -1e-98)
		tmp = t_1;
	elseif (t_2 <= 5e-230)
		tmp = (b / z) / c;
	elseif (t_2 <= 2e+111)
		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[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+25], t$95$3, If[LessEqual[t$95$2, -1e-98], t$95$1, If[LessEqual[t$95$2, 5e-230], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$2, 2e+111], t$95$1, t$95$3]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \left(a \cdot \frac{t}{c}\right) \cdot -4\\
t_2 := \left(x \cdot 9\right) \cdot y\\
t_3 := \left(x \cdot \frac{\frac{y}{c}}{z}\right) \cdot 9\\
\mathbf{if}\;t\_2 \leq -5 \cdot 10^{+25}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-98}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-230}:\\
\;\;\;\;\frac{\frac{b}{z}}{c}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+111}:\\
\;\;\;\;t\_1\\

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


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

    1. Initial program 75.3%

      \[\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{\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}} \]
      2. 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}} \]
      3. 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} \]
      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)} + b}{z \cdot c} \]
      5. lift-*.f64N/A

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

        \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      7. 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} \]
      8. lift-*.f64N/A

        \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
      9. 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} \]
      10. 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}{z}}{c}} \]
      11. 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}{z}}{c}} \]
    3. Applied rewrites73.3%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
      6. associate-+l-N/A

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

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

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

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

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

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

        \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
      13. lift-*.f6462.0

        \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
    9. Applied rewrites62.0%

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

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

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

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

        \[\leadsto \left(x \cdot \frac{\frac{y}{c}}{z}\right) \cdot 9 \]
      5. lower-/.f6465.1

        \[\leadsto \left(x \cdot \frac{\frac{y}{c}}{z}\right) \cdot 9 \]
    11. Applied rewrites65.1%

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

    if -5.00000000000000024e25 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999939e-99 or 5.00000000000000035e-230 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111

    1. Initial program 82.9%

      \[\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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      2. *-commutativeN/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      3. *-commutativeN/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      4. associate-*l*N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      5. lift-*.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      6. lift-*.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      7. *-commutativeN/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      8. associate--r-N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      9. lift-*.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      10. lift-*.f64N/A

        \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
      11. associate-/l/N/A

        \[\leadsto \color{blue}{-4} \cdot \frac{a \cdot t}{c} \]
      12. *-commutativeN/A

        \[\leadsto \frac{a \cdot t}{c} \cdot \color{blue}{-4} \]
    7. Applied rewrites44.5%

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

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

        \[\leadsto \frac{a \cdot t}{c} \cdot -4 \]
      3. associate-/l*N/A

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

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

        \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
    9. Applied rewrites46.2%

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

    if -9.99999999999999939e-99 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.00000000000000035e-230

    1. Initial program 81.1%

      \[\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 \frac{\color{blue}{b}}{z \cdot c} \]
    3. Step-by-step derivation
      1. Applied rewrites50.0%

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

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

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

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

          \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
      3. Applied rewrites48.9%

        \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
    4. Recombined 3 regimes into one program.
    5. Add Preprocessing

    Alternative 12: 53.3% accurate, 0.6× speedup?

    \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-98}:\\ \;\;\;\;\left(\frac{x}{c} \cdot \frac{y}{z}\right) \cdot 9\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-230}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+111}:\\ \;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\ \mathbf{else}:\\ \;\;\;\;-\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\ \end{array} \end{array} \]
    (FPCore (x y z t a b c)
     :precision binary64
     (let* ((t_1 (* (* x 9.0) y)))
       (if (<= t_1 -1e-98)
         (* (* (/ x c) (/ y z)) 9.0)
         (if (<= t_1 5e-230)
           (/ (/ b z) c)
           (if (<= t_1 2e+111)
             (* (* a (/ t c)) -4.0)
             (- (* (* (/ (/ y c) z) -9.0) x)))))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double t_1 = (x * 9.0) * y;
    	double tmp;
    	if (t_1 <= -1e-98) {
    		tmp = ((x / c) * (y / z)) * 9.0;
    	} else if (t_1 <= 5e-230) {
    		tmp = (b / z) / c;
    	} else if (t_1 <= 2e+111) {
    		tmp = (a * (t / c)) * -4.0;
    	} else {
    		tmp = -((((y / c) / z) * -9.0) * x);
    	}
    	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 = (x * 9.0d0) * y
        if (t_1 <= (-1d-98)) then
            tmp = ((x / c) * (y / z)) * 9.0d0
        else if (t_1 <= 5d-230) then
            tmp = (b / z) / c
        else if (t_1 <= 2d+111) then
            tmp = (a * (t / c)) * (-4.0d0)
        else
            tmp = -((((y / c) / z) * (-9.0d0)) * x)
        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 = (x * 9.0) * y;
    	double tmp;
    	if (t_1 <= -1e-98) {
    		tmp = ((x / c) * (y / z)) * 9.0;
    	} else if (t_1 <= 5e-230) {
    		tmp = (b / z) / c;
    	} else if (t_1 <= 2e+111) {
    		tmp = (a * (t / c)) * -4.0;
    	} else {
    		tmp = -((((y / c) / z) * -9.0) * x);
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	t_1 = (x * 9.0) * y
    	tmp = 0
    	if t_1 <= -1e-98:
    		tmp = ((x / c) * (y / z)) * 9.0
    	elif t_1 <= 5e-230:
    		tmp = (b / z) / c
    	elif t_1 <= 2e+111:
    		tmp = (a * (t / c)) * -4.0
    	else:
    		tmp = -((((y / c) / z) * -9.0) * x)
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	t_1 = Float64(Float64(x * 9.0) * y)
    	tmp = 0.0
    	if (t_1 <= -1e-98)
    		tmp = Float64(Float64(Float64(x / c) * Float64(y / z)) * 9.0);
    	elseif (t_1 <= 5e-230)
    		tmp = Float64(Float64(b / z) / c);
    	elseif (t_1 <= 2e+111)
    		tmp = Float64(Float64(a * Float64(t / c)) * -4.0);
    	else
    		tmp = Float64(-Float64(Float64(Float64(Float64(y / c) / z) * -9.0) * x));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	t_1 = (x * 9.0) * y;
    	tmp = 0.0;
    	if (t_1 <= -1e-98)
    		tmp = ((x / c) * (y / z)) * 9.0;
    	elseif (t_1 <= 5e-230)
    		tmp = (b / z) / c;
    	elseif (t_1 <= 2e+111)
    		tmp = (a * (t / c)) * -4.0;
    	else
    		tmp = -((((y / c) / z) * -9.0) * x);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-98], N[(N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision], If[LessEqual[t$95$1, 5e-230], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 2e+111], N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], (-N[(N[(N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision] * -9.0), $MachinePrecision] * x), $MachinePrecision])]]]]
    
    \begin{array}{l}
    
    \\
    \begin{array}{l}
    t_1 := \left(x \cdot 9\right) \cdot y\\
    \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-98}:\\
    \;\;\;\;\left(\frac{x}{c} \cdot \frac{y}{z}\right) \cdot 9\\
    
    \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-230}:\\
    \;\;\;\;\frac{\frac{b}{z}}{c}\\
    
    \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+111}:\\
    \;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\
    
    \mathbf{else}:\\
    \;\;\;\;-\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x\\
    
    
    \end{array}
    \end{array}
    
    Derivation
    1. Split input into 4 regimes
    2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999939e-99

      1. Initial program 77.0%

        \[\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{\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}} \]
        2. 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}} \]
        3. 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} \]
        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)} + b}{z \cdot c} \]
        5. lift-*.f64N/A

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

          \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
        7. 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} \]
        8. lift-*.f64N/A

          \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
        9. 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} \]
        10. 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}{z}}{c}} \]
        11. 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}{z}}{c}} \]
      3. Applied rewrites75.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
        15. lift-*.f6482.9

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

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

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

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

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

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

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

          \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
        6. associate-+l-N/A

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

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

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

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

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

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

          \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
        13. lift-*.f6449.1

          \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
      9. Applied rewrites49.1%

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

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

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

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

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

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

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

          \[\leadsto \left(\frac{x}{c} \cdot \frac{y}{z}\right) \cdot 9 \]
        8. lower-/.f6450.5

          \[\leadsto \left(\frac{x}{c} \cdot \frac{y}{z}\right) \cdot 9 \]
      11. Applied rewrites50.5%

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

      if -9.99999999999999939e-99 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.00000000000000035e-230

      1. Initial program 81.1%

        \[\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 \frac{\color{blue}{b}}{z \cdot c} \]
      3. Step-by-step derivation
        1. Applied rewrites50.0%

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

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

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

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

            \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
        3. Applied rewrites48.9%

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

        if 5.00000000000000035e-230 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111

        1. Initial program 83.5%

          \[\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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right)} \]
        5. Taylor expanded in z around inf

          \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
          2. *-commutativeN/A

            \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
          3. *-commutativeN/A

            \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
          4. associate-*l*N/A

            \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
          5. lift-*.f64N/A

            \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
          6. lift-*.f64N/A

            \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
          7. *-commutativeN/A

            \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
          8. associate--r-N/A

            \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
          9. lift-*.f64N/A

            \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
          10. lift-*.f64N/A

            \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
          11. associate-/l/N/A

            \[\leadsto \color{blue}{-4} \cdot \frac{a \cdot t}{c} \]
          12. *-commutativeN/A

            \[\leadsto \frac{a \cdot t}{c} \cdot \color{blue}{-4} \]
        7. Applied rewrites44.4%

          \[\leadsto \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]
        8. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \frac{a \cdot t}{c} \cdot -4 \]
          2. lift-/.f64N/A

            \[\leadsto \frac{a \cdot t}{c} \cdot -4 \]
          3. associate-/l*N/A

            \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
          4. lower-*.f64N/A

            \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
          5. lower-/.f6445.9

            \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
        9. Applied rewrites45.9%

          \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]

        if 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

        1. Initial program 75.3%

          \[\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}{-1 \cdot \left(x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right)\right)} \]
        3. Step-by-step derivation
          1. mul-1-negN/A

            \[\leadsto \mathsf{neg}\left(x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right)\right) \]
          2. lower-neg.f64N/A

            \[\leadsto -x \cdot \left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right) \]
          3. *-commutativeN/A

            \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right) \cdot x \]
          4. lower-*.f64N/A

            \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z} + -1 \cdot \frac{\frac{b}{c \cdot z} - 4 \cdot \frac{a \cdot t}{c}}{x}\right) \cdot x \]
        4. Applied rewrites72.9%

          \[\leadsto \color{blue}{-\mathsf{fma}\left(-9, \frac{y}{c \cdot z}, -\frac{\frac{b}{c \cdot z} - \frac{a \cdot t}{c} \cdot 4}{x}\right) \cdot x} \]
        5. Taylor expanded in x around inf

          \[\leadsto -\left(-9 \cdot \frac{y}{c \cdot z}\right) \cdot x \]
        6. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
          2. lower-*.f64N/A

            \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
          3. lift-/.f64N/A

            \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
          4. lift-*.f6467.5

            \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
        7. Applied rewrites67.5%

          \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
        8. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
          2. lift-/.f64N/A

            \[\leadsto -\left(\frac{y}{c \cdot z} \cdot -9\right) \cdot x \]
          3. associate-/r*N/A

            \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
          4. lower-/.f64N/A

            \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
          5. lower-/.f6470.7

            \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
        9. Applied rewrites70.7%

          \[\leadsto -\left(\frac{\frac{y}{c}}{z} \cdot -9\right) \cdot x \]
      4. Recombined 4 regimes into one program.
      5. Add Preprocessing

      Alternative 13: 53.3% accurate, 0.6× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-98}:\\ \;\;\;\;\left(\frac{x}{c} \cdot \frac{y}{z}\right) \cdot 9\\ \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-230}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+111}:\\ \;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot \frac{\frac{y}{c}}{z}\right) \cdot 9\\ \end{array} \end{array} \]
      (FPCore (x y z t a b c)
       :precision binary64
       (let* ((t_1 (* (* x 9.0) y)))
         (if (<= t_1 -1e-98)
           (* (* (/ x c) (/ y z)) 9.0)
           (if (<= t_1 5e-230)
             (/ (/ b z) c)
             (if (<= t_1 2e+111)
               (* (* a (/ t c)) -4.0)
               (* (* x (/ (/ y c) z)) 9.0))))))
      double code(double x, double y, double z, double t, double a, double b, double c) {
      	double t_1 = (x * 9.0) * y;
      	double tmp;
      	if (t_1 <= -1e-98) {
      		tmp = ((x / c) * (y / z)) * 9.0;
      	} else if (t_1 <= 5e-230) {
      		tmp = (b / z) / c;
      	} else if (t_1 <= 2e+111) {
      		tmp = (a * (t / c)) * -4.0;
      	} else {
      		tmp = (x * ((y / c) / z)) * 9.0;
      	}
      	return tmp;
      }
      
      module fmin_fmax_functions
          implicit none
          private
          public fmax
          public fmin
      
          interface fmax
              module procedure fmax88
              module procedure fmax44
              module procedure fmax84
              module procedure fmax48
          end interface
          interface fmin
              module procedure fmin88
              module procedure fmin44
              module procedure fmin84
              module procedure fmin48
          end interface
      contains
          real(8) function fmax88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(4) function fmax44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, max(x, y), y /= y), x /= x)
          end function
          real(8) function fmax84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmax48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
          end function
          real(8) function fmin88(x, y) result (res)
              real(8), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(4) function fmin44(x, y) result (res)
              real(4), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(y, merge(x, min(x, y), y /= y), x /= x)
          end function
          real(8) function fmin84(x, y) result(res)
              real(8), intent (in) :: x
              real(4), intent (in) :: y
              res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
          end function
          real(8) function fmin48(x, y) result(res)
              real(4), intent (in) :: x
              real(8), intent (in) :: y
              res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
          end function
      end module
      
      real(8) function code(x, y, z, t, a, 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 = (x * 9.0d0) * y
          if (t_1 <= (-1d-98)) then
              tmp = ((x / c) * (y / z)) * 9.0d0
          else if (t_1 <= 5d-230) then
              tmp = (b / z) / c
          else if (t_1 <= 2d+111) then
              tmp = (a * (t / c)) * (-4.0d0)
          else
              tmp = (x * ((y / c) / z)) * 9.0d0
          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 = (x * 9.0) * y;
      	double tmp;
      	if (t_1 <= -1e-98) {
      		tmp = ((x / c) * (y / z)) * 9.0;
      	} else if (t_1 <= 5e-230) {
      		tmp = (b / z) / c;
      	} else if (t_1 <= 2e+111) {
      		tmp = (a * (t / c)) * -4.0;
      	} else {
      		tmp = (x * ((y / c) / z)) * 9.0;
      	}
      	return tmp;
      }
      
      def code(x, y, z, t, a, b, c):
      	t_1 = (x * 9.0) * y
      	tmp = 0
      	if t_1 <= -1e-98:
      		tmp = ((x / c) * (y / z)) * 9.0
      	elif t_1 <= 5e-230:
      		tmp = (b / z) / c
      	elif t_1 <= 2e+111:
      		tmp = (a * (t / c)) * -4.0
      	else:
      		tmp = (x * ((y / c) / z)) * 9.0
      	return tmp
      
      function code(x, y, z, t, a, b, c)
      	t_1 = Float64(Float64(x * 9.0) * y)
      	tmp = 0.0
      	if (t_1 <= -1e-98)
      		tmp = Float64(Float64(Float64(x / c) * Float64(y / z)) * 9.0);
      	elseif (t_1 <= 5e-230)
      		tmp = Float64(Float64(b / z) / c);
      	elseif (t_1 <= 2e+111)
      		tmp = Float64(Float64(a * Float64(t / c)) * -4.0);
      	else
      		tmp = Float64(Float64(x * Float64(Float64(y / c) / z)) * 9.0);
      	end
      	return tmp
      end
      
      function tmp_2 = code(x, y, z, t, a, b, c)
      	t_1 = (x * 9.0) * y;
      	tmp = 0.0;
      	if (t_1 <= -1e-98)
      		tmp = ((x / c) * (y / z)) * 9.0;
      	elseif (t_1 <= 5e-230)
      		tmp = (b / z) / c;
      	elseif (t_1 <= 2e+111)
      		tmp = (a * (t / c)) * -4.0;
      	else
      		tmp = (x * ((y / c) / z)) * 9.0;
      	end
      	tmp_2 = tmp;
      end
      
      code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$1, -1e-98], N[(N[(N[(x / c), $MachinePrecision] * N[(y / z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision], If[LessEqual[t$95$1, 5e-230], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$1, 2e+111], N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], N[(N[(x * N[(N[(y / c), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision]]]]]
      
      \begin{array}{l}
      
      \\
      \begin{array}{l}
      t_1 := \left(x \cdot 9\right) \cdot y\\
      \mathbf{if}\;t\_1 \leq -1 \cdot 10^{-98}:\\
      \;\;\;\;\left(\frac{x}{c} \cdot \frac{y}{z}\right) \cdot 9\\
      
      \mathbf{elif}\;t\_1 \leq 5 \cdot 10^{-230}:\\
      \;\;\;\;\frac{\frac{b}{z}}{c}\\
      
      \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+111}:\\
      \;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\
      
      \mathbf{else}:\\
      \;\;\;\;\left(x \cdot \frac{\frac{y}{c}}{z}\right) \cdot 9\\
      
      
      \end{array}
      \end{array}
      
      Derivation
      1. Split input into 4 regimes
      2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999939e-99

        1. Initial program 77.0%

          \[\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{\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}} \]
          2. 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}} \]
          3. 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} \]
          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)} + b}{z \cdot c} \]
          5. lift-*.f64N/A

            \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right)} \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
          6. lift-*.f64N/A

            \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
          7. 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} \]
          8. lift-*.f64N/A

            \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
          9. 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} \]
          10. 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}{z}}{c}} \]
          11. 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}{z}}{c}} \]
        3. Applied rewrites75.4%

          \[\leadsto \color{blue}{\frac{\frac{\left(y \cdot x\right) \cdot 9 - \left(\left(\left(4 \cdot z\right) \cdot t\right) \cdot a - b\right)}{z}}{c}} \]
        4. Taylor expanded in x around 0

          \[\leadsto \frac{\color{blue}{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}}{c} \]
        5. Step-by-step derivation
          1. fp-cancel-sub-sign-invN/A

            \[\leadsto \frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) + \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)}}{c} \]
          2. metadata-evalN/A

            \[\leadsto \frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) + -4 \cdot \left(\color{blue}{a} \cdot t\right)}{c} \]
          3. +-commutativeN/A

            \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \color{blue}{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}}{c} \]
          4. *-commutativeN/A

            \[\leadsto \frac{\left(a \cdot t\right) \cdot -4 + \left(\color{blue}{9 \cdot \frac{x \cdot y}{z}} + \frac{b}{z}\right)}{c} \]
          5. lower-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, \color{blue}{-4}, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
          6. lift-*.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
          7. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z} + 9 \cdot \frac{x \cdot y}{z}\right)}{c} \]
          8. associate-*r/N/A

            \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z} + \frac{9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
          9. div-addN/A

            \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b + 9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
          10. lower-/.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b + 9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
          11. +-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{9 \cdot \left(x \cdot y\right) + b}{z}\right)}{c} \]
          12. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\left(x \cdot y\right) \cdot 9 + b}{z}\right)}{c} \]
          13. lower-fma.f64N/A

            \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c} \]
          14. *-commutativeN/A

            \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
          15. lift-*.f6482.9

            \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
        6. Applied rewrites82.9%

          \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}}{c} \]
        7. Taylor expanded in x around inf

          \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
        8. Step-by-step derivation
          1. *-commutativeN/A

            \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
          2. *-commutativeN/A

            \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
          3. associate-*r*N/A

            \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
          4. *-commutativeN/A

            \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
          5. *-commutativeN/A

            \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
          6. associate-+l-N/A

            \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
          7. associate-/r*N/A

            \[\leadsto \color{blue}{9} \cdot \frac{x \cdot y}{c \cdot z} \]
          8. *-commutativeN/A

            \[\leadsto \frac{x \cdot y}{c \cdot z} \cdot \color{blue}{9} \]
          9. lower-*.f64N/A

            \[\leadsto \frac{x \cdot y}{c \cdot z} \cdot \color{blue}{9} \]
          10. associate-/l*N/A

            \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
          11. lower-*.f64N/A

            \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
          12. lift-/.f64N/A

            \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
          13. lift-*.f6449.1

            \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
        9. Applied rewrites49.1%

          \[\leadsto \color{blue}{\left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9} \]
        10. Step-by-step derivation
          1. lift-*.f64N/A

            \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
          2. lift-*.f64N/A

            \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
          3. lift-/.f64N/A

            \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
          4. associate-/l*N/A

            \[\leadsto \frac{x \cdot y}{c \cdot z} \cdot 9 \]
          5. times-fracN/A

            \[\leadsto \left(\frac{x}{c} \cdot \frac{y}{z}\right) \cdot 9 \]
          6. lower-*.f64N/A

            \[\leadsto \left(\frac{x}{c} \cdot \frac{y}{z}\right) \cdot 9 \]
          7. lower-/.f64N/A

            \[\leadsto \left(\frac{x}{c} \cdot \frac{y}{z}\right) \cdot 9 \]
          8. lower-/.f6450.5

            \[\leadsto \left(\frac{x}{c} \cdot \frac{y}{z}\right) \cdot 9 \]
        11. Applied rewrites50.5%

          \[\leadsto \left(\frac{x}{c} \cdot \frac{y}{z}\right) \cdot 9 \]

        if -9.99999999999999939e-99 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.00000000000000035e-230

        1. Initial program 81.1%

          \[\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 \frac{\color{blue}{b}}{z \cdot c} \]
        3. Step-by-step derivation
          1. Applied rewrites50.0%

            \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
          2. Step-by-step derivation
            1. lift-/.f64N/A

              \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]
            2. lift-*.f64N/A

              \[\leadsto \frac{b}{\color{blue}{z \cdot c}} \]
            3. associate-/r*N/A

              \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
            4. lower-/.f64N/A

              \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
          3. Applied rewrites48.9%

            \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]

          if 5.00000000000000035e-230 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111

          1. Initial program 83.5%

            \[\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 0

            \[\leadsto \color{blue}{\left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c}} \]
          3. Step-by-step derivation
            1. fp-cancel-sub-sign-invN/A

              \[\leadsto \left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) + \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \frac{a \cdot t}{c}} \]
            2. metadata-evalN/A

              \[\leadsto \left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) + -4 \cdot \frac{\color{blue}{a \cdot t}}{c} \]
            3. +-commutativeN/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} + \color{blue}{\left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right)} \]
            4. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(-4, \color{blue}{\frac{a \cdot t}{c}}, 9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) \]
            5. lower-/.f64N/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{\color{blue}{c}}, 9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) \]
            6. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, 9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) \]
            7. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z} + 9 \cdot \frac{x \cdot y}{c \cdot z}\right) \]
            8. associate-*r/N/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z} + \frac{9 \cdot \left(x \cdot y\right)}{c \cdot z}\right) \]
            9. div-addN/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\right) \]
            10. lower-/.f64N/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\right) \]
            11. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{9 \cdot \left(x \cdot y\right) + b}{c \cdot z}\right) \]
            12. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\left(x \cdot y\right) \cdot 9 + b}{c \cdot z}\right) \]
            13. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c \cdot z}\right) \]
            14. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
            15. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
            16. lower-*.f6488.7

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
          4. Applied rewrites88.7%

            \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right)} \]
          5. Taylor expanded in z around inf

            \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
          6. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            2. *-commutativeN/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            3. *-commutativeN/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            4. associate-*l*N/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            5. lift-*.f64N/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            6. lift-*.f64N/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            7. *-commutativeN/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            8. associate--r-N/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            9. lift-*.f64N/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            10. lift-*.f64N/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            11. associate-/l/N/A

              \[\leadsto \color{blue}{-4} \cdot \frac{a \cdot t}{c} \]
            12. *-commutativeN/A

              \[\leadsto \frac{a \cdot t}{c} \cdot \color{blue}{-4} \]
          7. Applied rewrites44.4%

            \[\leadsto \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]
          8. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{a \cdot t}{c} \cdot -4 \]
            2. lift-/.f64N/A

              \[\leadsto \frac{a \cdot t}{c} \cdot -4 \]
            3. associate-/l*N/A

              \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
            4. lower-*.f64N/A

              \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
            5. lower-/.f6445.9

              \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
          9. Applied rewrites45.9%

            \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]

          if 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

          1. Initial program 75.3%

            \[\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{\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}} \]
            2. 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}} \]
            3. 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} \]
            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)} + b}{z \cdot c} \]
            5. lift-*.f64N/A

              \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right)} \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
            6. lift-*.f64N/A

              \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
            7. 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} \]
            8. lift-*.f64N/A

              \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
            9. 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} \]
            10. 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}{z}}{c}} \]
            11. 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}{z}}{c}} \]
          3. Applied rewrites73.3%

            \[\leadsto \color{blue}{\frac{\frac{\left(y \cdot x\right) \cdot 9 - \left(\left(\left(4 \cdot z\right) \cdot t\right) \cdot a - b\right)}{z}}{c}} \]
          4. Taylor expanded in x around 0

            \[\leadsto \frac{\color{blue}{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}}{c} \]
          5. Step-by-step derivation
            1. fp-cancel-sub-sign-invN/A

              \[\leadsto \frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) + \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)}}{c} \]
            2. metadata-evalN/A

              \[\leadsto \frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) + -4 \cdot \left(\color{blue}{a} \cdot t\right)}{c} \]
            3. +-commutativeN/A

              \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \color{blue}{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}}{c} \]
            4. *-commutativeN/A

              \[\leadsto \frac{\left(a \cdot t\right) \cdot -4 + \left(\color{blue}{9 \cdot \frac{x \cdot y}{z}} + \frac{b}{z}\right)}{c} \]
            5. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, \color{blue}{-4}, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
            6. lift-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
            7. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z} + 9 \cdot \frac{x \cdot y}{z}\right)}{c} \]
            8. associate-*r/N/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z} + \frac{9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
            9. div-addN/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b + 9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
            10. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b + 9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{9 \cdot \left(x \cdot y\right) + b}{z}\right)}{c} \]
            12. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\left(x \cdot y\right) \cdot 9 + b}{z}\right)}{c} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c} \]
            14. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
            15. lift-*.f6479.3

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
          6. Applied rewrites79.3%

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}}{c} \]
          7. Taylor expanded in x around inf

            \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
          8. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
            2. *-commutativeN/A

              \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
            3. associate-*r*N/A

              \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
            4. *-commutativeN/A

              \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
            5. *-commutativeN/A

              \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
            6. associate-+l-N/A

              \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
            7. associate-/r*N/A

              \[\leadsto \color{blue}{9} \cdot \frac{x \cdot y}{c \cdot z} \]
            8. *-commutativeN/A

              \[\leadsto \frac{x \cdot y}{c \cdot z} \cdot \color{blue}{9} \]
            9. lower-*.f64N/A

              \[\leadsto \frac{x \cdot y}{c \cdot z} \cdot \color{blue}{9} \]
            10. associate-/l*N/A

              \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
            11. lower-*.f64N/A

              \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
            12. lift-/.f64N/A

              \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
            13. lift-*.f6467.5

              \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
          9. Applied rewrites67.5%

            \[\leadsto \color{blue}{\left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9} \]
          10. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
            2. lift-/.f64N/A

              \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
            3. associate-/r*N/A

              \[\leadsto \left(x \cdot \frac{\frac{y}{c}}{z}\right) \cdot 9 \]
            4. lower-/.f64N/A

              \[\leadsto \left(x \cdot \frac{\frac{y}{c}}{z}\right) \cdot 9 \]
            5. lower-/.f6470.7

              \[\leadsto \left(x \cdot \frac{\frac{y}{c}}{z}\right) \cdot 9 \]
          11. Applied rewrites70.7%

            \[\leadsto \left(x \cdot \frac{\frac{y}{c}}{z}\right) \cdot 9 \]
        4. Recombined 4 regimes into one program.
        5. Add Preprocessing

        Alternative 14: 52.5% accurate, 0.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{y}{c \cdot z}\\ t_2 := \left(a \cdot \frac{t}{c}\right) \cdot -4\\ t_3 := \left(x \cdot 9\right) \cdot y\\ \mathbf{if}\;t\_3 \leq -5 \cdot 10^{+25}:\\ \;\;\;\;x \cdot \left(t\_1 \cdot 9\right)\\ \mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-98}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{-230}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+111}:\\ \;\;\;\;t\_2\\ \mathbf{else}:\\ \;\;\;\;\left(x \cdot t\_1\right) \cdot 9\\ \end{array} \end{array} \]
        (FPCore (x y z t a b c)
         :precision binary64
         (let* ((t_1 (/ y (* c z))) (t_2 (* (* a (/ t c)) -4.0)) (t_3 (* (* x 9.0) y)))
           (if (<= t_3 -5e+25)
             (* x (* t_1 9.0))
             (if (<= t_3 -1e-98)
               t_2
               (if (<= t_3 5e-230)
                 (/ (/ b z) c)
                 (if (<= t_3 2e+111) t_2 (* (* x t_1) 9.0)))))))
        double code(double x, double y, double z, double t, double a, double b, double c) {
        	double t_1 = y / (c * z);
        	double t_2 = (a * (t / c)) * -4.0;
        	double t_3 = (x * 9.0) * y;
        	double tmp;
        	if (t_3 <= -5e+25) {
        		tmp = x * (t_1 * 9.0);
        	} else if (t_3 <= -1e-98) {
        		tmp = t_2;
        	} else if (t_3 <= 5e-230) {
        		tmp = (b / z) / c;
        	} else if (t_3 <= 2e+111) {
        		tmp = t_2;
        	} else {
        		tmp = (x * t_1) * 9.0;
        	}
        	return tmp;
        }
        
        module fmin_fmax_functions
            implicit none
            private
            public fmax
            public fmin
        
            interface fmax
                module procedure fmax88
                module procedure fmax44
                module procedure fmax84
                module procedure fmax48
            end interface
            interface fmin
                module procedure fmin88
                module procedure fmin44
                module procedure fmin84
                module procedure fmin48
            end interface
        contains
            real(8) function fmax88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(4) function fmax44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, max(x, y), y /= y), x /= x)
            end function
            real(8) function fmax84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmax48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
            end function
            real(8) function fmin88(x, y) result (res)
                real(8), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(4) function fmin44(x, y) result (res)
                real(4), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(y, merge(x, min(x, y), y /= y), x /= x)
            end function
            real(8) function fmin84(x, y) result(res)
                real(8), intent (in) :: x
                real(4), intent (in) :: y
                res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
            end function
            real(8) function fmin48(x, y) result(res)
                real(4), intent (in) :: x
                real(8), intent (in) :: y
                res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
            end function
        end module
        
        real(8) function code(x, y, z, t, a, 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 = y / (c * z)
            t_2 = (a * (t / c)) * (-4.0d0)
            t_3 = (x * 9.0d0) * y
            if (t_3 <= (-5d+25)) then
                tmp = x * (t_1 * 9.0d0)
            else if (t_3 <= (-1d-98)) then
                tmp = t_2
            else if (t_3 <= 5d-230) then
                tmp = (b / z) / c
            else if (t_3 <= 2d+111) then
                tmp = t_2
            else
                tmp = (x * t_1) * 9.0d0
            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 = y / (c * z);
        	double t_2 = (a * (t / c)) * -4.0;
        	double t_3 = (x * 9.0) * y;
        	double tmp;
        	if (t_3 <= -5e+25) {
        		tmp = x * (t_1 * 9.0);
        	} else if (t_3 <= -1e-98) {
        		tmp = t_2;
        	} else if (t_3 <= 5e-230) {
        		tmp = (b / z) / c;
        	} else if (t_3 <= 2e+111) {
        		tmp = t_2;
        	} else {
        		tmp = (x * t_1) * 9.0;
        	}
        	return tmp;
        }
        
        def code(x, y, z, t, a, b, c):
        	t_1 = y / (c * z)
        	t_2 = (a * (t / c)) * -4.0
        	t_3 = (x * 9.0) * y
        	tmp = 0
        	if t_3 <= -5e+25:
        		tmp = x * (t_1 * 9.0)
        	elif t_3 <= -1e-98:
        		tmp = t_2
        	elif t_3 <= 5e-230:
        		tmp = (b / z) / c
        	elif t_3 <= 2e+111:
        		tmp = t_2
        	else:
        		tmp = (x * t_1) * 9.0
        	return tmp
        
        function code(x, y, z, t, a, b, c)
        	t_1 = Float64(y / Float64(c * z))
        	t_2 = Float64(Float64(a * Float64(t / c)) * -4.0)
        	t_3 = Float64(Float64(x * 9.0) * y)
        	tmp = 0.0
        	if (t_3 <= -5e+25)
        		tmp = Float64(x * Float64(t_1 * 9.0));
        	elseif (t_3 <= -1e-98)
        		tmp = t_2;
        	elseif (t_3 <= 5e-230)
        		tmp = Float64(Float64(b / z) / c);
        	elseif (t_3 <= 2e+111)
        		tmp = t_2;
        	else
        		tmp = Float64(Float64(x * t_1) * 9.0);
        	end
        	return tmp
        end
        
        function tmp_2 = code(x, y, z, t, a, b, c)
        	t_1 = y / (c * z);
        	t_2 = (a * (t / c)) * -4.0;
        	t_3 = (x * 9.0) * y;
        	tmp = 0.0;
        	if (t_3 <= -5e+25)
        		tmp = x * (t_1 * 9.0);
        	elseif (t_3 <= -1e-98)
        		tmp = t_2;
        	elseif (t_3 <= 5e-230)
        		tmp = (b / z) / c;
        	elseif (t_3 <= 2e+111)
        		tmp = t_2;
        	else
        		tmp = (x * t_1) * 9.0;
        	end
        	tmp_2 = tmp;
        end
        
        code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, If[LessEqual[t$95$3, -5e+25], N[(x * N[(t$95$1 * 9.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$3, -1e-98], t$95$2, If[LessEqual[t$95$3, 5e-230], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$3, 2e+111], t$95$2, N[(N[(x * t$95$1), $MachinePrecision] * 9.0), $MachinePrecision]]]]]]]]
        
        \begin{array}{l}
        
        \\
        \begin{array}{l}
        t_1 := \frac{y}{c \cdot z}\\
        t_2 := \left(a \cdot \frac{t}{c}\right) \cdot -4\\
        t_3 := \left(x \cdot 9\right) \cdot y\\
        \mathbf{if}\;t\_3 \leq -5 \cdot 10^{+25}:\\
        \;\;\;\;x \cdot \left(t\_1 \cdot 9\right)\\
        
        \mathbf{elif}\;t\_3 \leq -1 \cdot 10^{-98}:\\
        \;\;\;\;t\_2\\
        
        \mathbf{elif}\;t\_3 \leq 5 \cdot 10^{-230}:\\
        \;\;\;\;\frac{\frac{b}{z}}{c}\\
        
        \mathbf{elif}\;t\_3 \leq 2 \cdot 10^{+111}:\\
        \;\;\;\;t\_2\\
        
        \mathbf{else}:\\
        \;\;\;\;\left(x \cdot t\_1\right) \cdot 9\\
        
        
        \end{array}
        \end{array}
        
        Derivation
        1. Split input into 4 regimes
        2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000024e25

          1. Initial program 75.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{\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}} \]
            2. 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}} \]
            3. 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} \]
            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)} + b}{z \cdot c} \]
            5. lift-*.f64N/A

              \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right)} \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
            6. lift-*.f64N/A

              \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
            7. 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} \]
            8. lift-*.f64N/A

              \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
            9. 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} \]
            10. 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}{z}}{c}} \]
            11. 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}{z}}{c}} \]
          3. Applied rewrites73.3%

            \[\leadsto \color{blue}{\frac{\frac{\left(y \cdot x\right) \cdot 9 - \left(\left(\left(4 \cdot z\right) \cdot t\right) \cdot a - b\right)}{z}}{c}} \]
          4. Taylor expanded in x around 0

            \[\leadsto \frac{\color{blue}{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}}{c} \]
          5. Step-by-step derivation
            1. fp-cancel-sub-sign-invN/A

              \[\leadsto \frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) + \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)}}{c} \]
            2. metadata-evalN/A

              \[\leadsto \frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) + -4 \cdot \left(\color{blue}{a} \cdot t\right)}{c} \]
            3. +-commutativeN/A

              \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \color{blue}{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}}{c} \]
            4. *-commutativeN/A

              \[\leadsto \frac{\left(a \cdot t\right) \cdot -4 + \left(\color{blue}{9 \cdot \frac{x \cdot y}{z}} + \frac{b}{z}\right)}{c} \]
            5. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, \color{blue}{-4}, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
            6. lift-*.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
            7. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z} + 9 \cdot \frac{x \cdot y}{z}\right)}{c} \]
            8. associate-*r/N/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z} + \frac{9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
            9. div-addN/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b + 9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
            10. lower-/.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b + 9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
            11. +-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{9 \cdot \left(x \cdot y\right) + b}{z}\right)}{c} \]
            12. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\left(x \cdot y\right) \cdot 9 + b}{z}\right)}{c} \]
            13. lower-fma.f64N/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c} \]
            14. *-commutativeN/A

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
            15. lift-*.f6479.6

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
          6. Applied rewrites79.6%

            \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}}{c} \]
          7. Taylor expanded in x around inf

            \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
          8. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
            2. *-commutativeN/A

              \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
            3. associate-*r*N/A

              \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
            4. *-commutativeN/A

              \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
            5. *-commutativeN/A

              \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
            6. associate-+l-N/A

              \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
            7. associate-/r*N/A

              \[\leadsto \color{blue}{9} \cdot \frac{x \cdot y}{c \cdot z} \]
            8. *-commutativeN/A

              \[\leadsto \frac{x \cdot y}{c \cdot z} \cdot \color{blue}{9} \]
            9. lower-*.f64N/A

              \[\leadsto \frac{x \cdot y}{c \cdot z} \cdot \color{blue}{9} \]
            10. associate-/l*N/A

              \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
            11. lower-*.f64N/A

              \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
            12. lift-/.f64N/A

              \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
            13. lift-*.f6457.8

              \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
          9. Applied rewrites57.8%

            \[\leadsto \color{blue}{\left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9} \]
          10. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot \color{blue}{9} \]
            2. lift-*.f64N/A

              \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
            3. lift-*.f64N/A

              \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
            4. lift-/.f64N/A

              \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
            5. associate-*l*N/A

              \[\leadsto x \cdot \color{blue}{\left(\frac{y}{c \cdot z} \cdot 9\right)} \]
            6. *-commutativeN/A

              \[\leadsto x \cdot \left(9 \cdot \color{blue}{\frac{y}{c \cdot z}}\right) \]
            7. lower-*.f64N/A

              \[\leadsto x \cdot \color{blue}{\left(9 \cdot \frac{y}{c \cdot z}\right)} \]
            8. *-commutativeN/A

              \[\leadsto x \cdot \left(\frac{y}{c \cdot z} \cdot \color{blue}{9}\right) \]
            9. lower-*.f64N/A

              \[\leadsto x \cdot \left(\frac{y}{c \cdot z} \cdot \color{blue}{9}\right) \]
            10. lift-/.f64N/A

              \[\leadsto x \cdot \left(\frac{y}{c \cdot z} \cdot 9\right) \]
            11. lift-*.f6457.8

              \[\leadsto x \cdot \left(\frac{y}{c \cdot z} \cdot 9\right) \]
          11. Applied rewrites57.8%

            \[\leadsto x \cdot \color{blue}{\left(\frac{y}{c \cdot z} \cdot 9\right)} \]

          if -5.00000000000000024e25 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999939e-99 or 5.00000000000000035e-230 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111

          1. Initial program 82.9%

            \[\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 0

            \[\leadsto \color{blue}{\left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c}} \]
          3. Step-by-step derivation
            1. fp-cancel-sub-sign-invN/A

              \[\leadsto \left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) + \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \frac{a \cdot t}{c}} \]
            2. metadata-evalN/A

              \[\leadsto \left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) + -4 \cdot \frac{\color{blue}{a \cdot t}}{c} \]
            3. +-commutativeN/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} + \color{blue}{\left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right)} \]
            4. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(-4, \color{blue}{\frac{a \cdot t}{c}}, 9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) \]
            5. lower-/.f64N/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{\color{blue}{c}}, 9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) \]
            6. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, 9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) \]
            7. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z} + 9 \cdot \frac{x \cdot y}{c \cdot z}\right) \]
            8. associate-*r/N/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z} + \frac{9 \cdot \left(x \cdot y\right)}{c \cdot z}\right) \]
            9. div-addN/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\right) \]
            10. lower-/.f64N/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\right) \]
            11. +-commutativeN/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{9 \cdot \left(x \cdot y\right) + b}{c \cdot z}\right) \]
            12. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\left(x \cdot y\right) \cdot 9 + b}{c \cdot z}\right) \]
            13. lower-fma.f64N/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c \cdot z}\right) \]
            14. *-commutativeN/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
            15. lower-*.f64N/A

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
            16. lower-*.f6489.0

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
          4. Applied rewrites89.0%

            \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right)} \]
          5. Taylor expanded in z around inf

            \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
          6. Step-by-step derivation
            1. *-commutativeN/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            2. *-commutativeN/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            3. *-commutativeN/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            4. associate-*l*N/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            5. lift-*.f64N/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            6. lift-*.f64N/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            7. *-commutativeN/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            8. associate--r-N/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            9. lift-*.f64N/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            10. lift-*.f64N/A

              \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
            11. associate-/l/N/A

              \[\leadsto \color{blue}{-4} \cdot \frac{a \cdot t}{c} \]
            12. *-commutativeN/A

              \[\leadsto \frac{a \cdot t}{c} \cdot \color{blue}{-4} \]
          7. Applied rewrites44.5%

            \[\leadsto \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]
          8. Step-by-step derivation
            1. lift-*.f64N/A

              \[\leadsto \frac{a \cdot t}{c} \cdot -4 \]
            2. lift-/.f64N/A

              \[\leadsto \frac{a \cdot t}{c} \cdot -4 \]
            3. associate-/l*N/A

              \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
            4. lower-*.f64N/A

              \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
            5. lower-/.f6446.2

              \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
          9. Applied rewrites46.2%

            \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]

          if -9.99999999999999939e-99 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.00000000000000035e-230

          1. Initial program 81.1%

            \[\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 \frac{\color{blue}{b}}{z \cdot c} \]
          3. Step-by-step derivation
            1. Applied rewrites50.0%

              \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
            2. Step-by-step derivation
              1. lift-/.f64N/A

                \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]
              2. lift-*.f64N/A

                \[\leadsto \frac{b}{\color{blue}{z \cdot c}} \]
              3. associate-/r*N/A

                \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
              4. lower-/.f64N/A

                \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
            3. Applied rewrites48.9%

              \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]

            if 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

            1. Initial program 82.9%

              \[\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{\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}} \]
              2. 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}} \]
              3. 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} \]
              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)} + b}{z \cdot c} \]
              5. lift-*.f64N/A

                \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right)} \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
              6. lift-*.f64N/A

                \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
              7. 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} \]
              8. lift-*.f64N/A

                \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
              9. 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} \]
              10. 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}{z}}{c}} \]
              11. 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}{z}}{c}} \]
            3. Applied rewrites82.5%

              \[\leadsto \color{blue}{\frac{\frac{\left(y \cdot x\right) \cdot 9 - \left(\left(\left(4 \cdot z\right) \cdot t\right) \cdot a - b\right)}{z}}{c}} \]
            4. Taylor expanded in x around 0

              \[\leadsto \frac{\color{blue}{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}}{c} \]
            5. Step-by-step derivation
              1. fp-cancel-sub-sign-invN/A

                \[\leadsto \frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) + \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)}}{c} \]
              2. metadata-evalN/A

                \[\leadsto \frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) + -4 \cdot \left(\color{blue}{a} \cdot t\right)}{c} \]
              3. +-commutativeN/A

                \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \color{blue}{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}}{c} \]
              4. *-commutativeN/A

                \[\leadsto \frac{\left(a \cdot t\right) \cdot -4 + \left(\color{blue}{9 \cdot \frac{x \cdot y}{z}} + \frac{b}{z}\right)}{c} \]
              5. lower-fma.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, \color{blue}{-4}, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
              6. lift-*.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
              7. +-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z} + 9 \cdot \frac{x \cdot y}{z}\right)}{c} \]
              8. associate-*r/N/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z} + \frac{9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
              9. div-addN/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b + 9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
              10. lower-/.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b + 9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
              11. +-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{9 \cdot \left(x \cdot y\right) + b}{z}\right)}{c} \]
              12. *-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\left(x \cdot y\right) \cdot 9 + b}{z}\right)}{c} \]
              13. lower-fma.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c} \]
              14. *-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
              15. lift-*.f6490.7

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
            6. Applied rewrites90.7%

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}}{c} \]
            7. Taylor expanded in x around inf

              \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
            8. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
              2. *-commutativeN/A

                \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
              3. associate-*r*N/A

                \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
              4. *-commutativeN/A

                \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
              5. *-commutativeN/A

                \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
              6. associate-+l-N/A

                \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
              7. associate-/r*N/A

                \[\leadsto \color{blue}{9} \cdot \frac{x \cdot y}{c \cdot z} \]
              8. *-commutativeN/A

                \[\leadsto \frac{x \cdot y}{c \cdot z} \cdot \color{blue}{9} \]
              9. lower-*.f64N/A

                \[\leadsto \frac{x \cdot y}{c \cdot z} \cdot \color{blue}{9} \]
              10. associate-/l*N/A

                \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
              11. lower-*.f64N/A

                \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
              12. lift-/.f64N/A

                \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
              13. lift-*.f6425.9

                \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
            9. Applied rewrites25.9%

              \[\leadsto \color{blue}{\left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9} \]
          4. Recombined 4 regimes into one program.
          5. Add Preprocessing

          Alternative 15: 52.5% accurate, 0.5× speedup?

          \[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(a \cdot \frac{t}{c}\right) \cdot -4\\ t_2 := \left(x \cdot 9\right) \cdot y\\ t_3 := x \cdot \left(\frac{y}{c \cdot z} \cdot 9\right)\\ \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+25}:\\ \;\;\;\;t\_3\\ \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-98}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-230}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+111}:\\ \;\;\;\;t\_1\\ \mathbf{else}:\\ \;\;\;\;t\_3\\ \end{array} \end{array} \]
          (FPCore (x y z t a b c)
           :precision binary64
           (let* ((t_1 (* (* a (/ t c)) -4.0))
                  (t_2 (* (* x 9.0) y))
                  (t_3 (* x (* (/ y (* c z)) 9.0))))
             (if (<= t_2 -5e+25)
               t_3
               (if (<= t_2 -1e-98)
                 t_1
                 (if (<= t_2 5e-230) (/ (/ b z) c) (if (<= t_2 2e+111) t_1 t_3))))))
          double code(double x, double y, double z, double t, double a, double b, double c) {
          	double t_1 = (a * (t / c)) * -4.0;
          	double t_2 = (x * 9.0) * y;
          	double t_3 = x * ((y / (c * z)) * 9.0);
          	double tmp;
          	if (t_2 <= -5e+25) {
          		tmp = t_3;
          	} else if (t_2 <= -1e-98) {
          		tmp = t_1;
          	} else if (t_2 <= 5e-230) {
          		tmp = (b / z) / c;
          	} else if (t_2 <= 2e+111) {
          		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 * (t / c)) * (-4.0d0)
              t_2 = (x * 9.0d0) * y
              t_3 = x * ((y / (c * z)) * 9.0d0)
              if (t_2 <= (-5d+25)) then
                  tmp = t_3
              else if (t_2 <= (-1d-98)) then
                  tmp = t_1
              else if (t_2 <= 5d-230) then
                  tmp = (b / z) / c
              else if (t_2 <= 2d+111) 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 * (t / c)) * -4.0;
          	double t_2 = (x * 9.0) * y;
          	double t_3 = x * ((y / (c * z)) * 9.0);
          	double tmp;
          	if (t_2 <= -5e+25) {
          		tmp = t_3;
          	} else if (t_2 <= -1e-98) {
          		tmp = t_1;
          	} else if (t_2 <= 5e-230) {
          		tmp = (b / z) / c;
          	} else if (t_2 <= 2e+111) {
          		tmp = t_1;
          	} else {
          		tmp = t_3;
          	}
          	return tmp;
          }
          
          def code(x, y, z, t, a, b, c):
          	t_1 = (a * (t / c)) * -4.0
          	t_2 = (x * 9.0) * y
          	t_3 = x * ((y / (c * z)) * 9.0)
          	tmp = 0
          	if t_2 <= -5e+25:
          		tmp = t_3
          	elif t_2 <= -1e-98:
          		tmp = t_1
          	elif t_2 <= 5e-230:
          		tmp = (b / z) / c
          	elif t_2 <= 2e+111:
          		tmp = t_1
          	else:
          		tmp = t_3
          	return tmp
          
          function code(x, y, z, t, a, b, c)
          	t_1 = Float64(Float64(a * Float64(t / c)) * -4.0)
          	t_2 = Float64(Float64(x * 9.0) * y)
          	t_3 = Float64(x * Float64(Float64(y / Float64(c * z)) * 9.0))
          	tmp = 0.0
          	if (t_2 <= -5e+25)
          		tmp = t_3;
          	elseif (t_2 <= -1e-98)
          		tmp = t_1;
          	elseif (t_2 <= 5e-230)
          		tmp = Float64(Float64(b / z) / c);
          	elseif (t_2 <= 2e+111)
          		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 * (t / c)) * -4.0;
          	t_2 = (x * 9.0) * y;
          	t_3 = x * ((y / (c * z)) * 9.0);
          	tmp = 0.0;
          	if (t_2 <= -5e+25)
          		tmp = t_3;
          	elseif (t_2 <= -1e-98)
          		tmp = t_1;
          	elseif (t_2 <= 5e-230)
          		tmp = (b / z) / c;
          	elseif (t_2 <= 2e+111)
          		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[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision]}, Block[{t$95$2 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$3 = N[(x * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * 9.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -5e+25], t$95$3, If[LessEqual[t$95$2, -1e-98], t$95$1, If[LessEqual[t$95$2, 5e-230], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[t$95$2, 2e+111], t$95$1, t$95$3]]]]]]]
          
          \begin{array}{l}
          
          \\
          \begin{array}{l}
          t_1 := \left(a \cdot \frac{t}{c}\right) \cdot -4\\
          t_2 := \left(x \cdot 9\right) \cdot y\\
          t_3 := x \cdot \left(\frac{y}{c \cdot z} \cdot 9\right)\\
          \mathbf{if}\;t\_2 \leq -5 \cdot 10^{+25}:\\
          \;\;\;\;t\_3\\
          
          \mathbf{elif}\;t\_2 \leq -1 \cdot 10^{-98}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-230}:\\
          \;\;\;\;\frac{\frac{b}{z}}{c}\\
          
          \mathbf{elif}\;t\_2 \leq 2 \cdot 10^{+111}:\\
          \;\;\;\;t\_1\\
          
          \mathbf{else}:\\
          \;\;\;\;t\_3\\
          
          
          \end{array}
          \end{array}
          
          Derivation
          1. Split input into 3 regimes
          2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -5.00000000000000024e25 or 1.99999999999999991e111 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

            1. Initial program 75.3%

              \[\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{\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}} \]
              2. 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}} \]
              3. 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} \]
              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)} + b}{z \cdot c} \]
              5. lift-*.f64N/A

                \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right)} \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
              6. lift-*.f64N/A

                \[\leadsto \frac{\left(\color{blue}{\left(x \cdot 9\right) \cdot y} - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
              7. 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} \]
              8. lift-*.f64N/A

                \[\leadsto \frac{\left(\left(x \cdot 9\right) \cdot y - \left(\color{blue}{\left(z \cdot 4\right)} \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
              9. 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} \]
              10. 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}{z}}{c}} \]
              11. 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}{z}}{c}} \]
            3. Applied rewrites73.3%

              \[\leadsto \color{blue}{\frac{\frac{\left(y \cdot x\right) \cdot 9 - \left(\left(\left(4 \cdot z\right) \cdot t\right) \cdot a - b\right)}{z}}{c}} \]
            4. Taylor expanded in x around 0

              \[\leadsto \frac{\color{blue}{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) - 4 \cdot \left(a \cdot t\right)}}{c} \]
            5. Step-by-step derivation
              1. fp-cancel-sub-sign-invN/A

                \[\leadsto \frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) + \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \left(a \cdot t\right)}}{c} \]
              2. metadata-evalN/A

                \[\leadsto \frac{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right) + -4 \cdot \left(\color{blue}{a} \cdot t\right)}{c} \]
              3. +-commutativeN/A

                \[\leadsto \frac{-4 \cdot \left(a \cdot t\right) + \color{blue}{\left(9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}}{c} \]
              4. *-commutativeN/A

                \[\leadsto \frac{\left(a \cdot t\right) \cdot -4 + \left(\color{blue}{9 \cdot \frac{x \cdot y}{z}} + \frac{b}{z}\right)}{c} \]
              5. lower-fma.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, \color{blue}{-4}, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
              6. lift-*.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, 9 \cdot \frac{x \cdot y}{z} + \frac{b}{z}\right)}{c} \]
              7. +-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z} + 9 \cdot \frac{x \cdot y}{z}\right)}{c} \]
              8. associate-*r/N/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z} + \frac{9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
              9. div-addN/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b + 9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
              10. lower-/.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b + 9 \cdot \left(x \cdot y\right)}{z}\right)}{c} \]
              11. +-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{9 \cdot \left(x \cdot y\right) + b}{z}\right)}{c} \]
              12. *-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\left(x \cdot y\right) \cdot 9 + b}{z}\right)}{c} \]
              13. lower-fma.f64N/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{z}\right)}{c} \]
              14. *-commutativeN/A

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
              15. lift-*.f6479.5

                \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c} \]
            6. Applied rewrites79.5%

              \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}}{c} \]
            7. Taylor expanded in x around inf

              \[\leadsto \color{blue}{9 \cdot \frac{x \cdot y}{c \cdot z}} \]
            8. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
              2. *-commutativeN/A

                \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
              3. associate-*r*N/A

                \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
              4. *-commutativeN/A

                \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
              5. *-commutativeN/A

                \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
              6. associate-+l-N/A

                \[\leadsto 9 \cdot \frac{x \cdot y}{c \cdot z} \]
              7. associate-/r*N/A

                \[\leadsto \color{blue}{9} \cdot \frac{x \cdot y}{c \cdot z} \]
              8. *-commutativeN/A

                \[\leadsto \frac{x \cdot y}{c \cdot z} \cdot \color{blue}{9} \]
              9. lower-*.f64N/A

                \[\leadsto \frac{x \cdot y}{c \cdot z} \cdot \color{blue}{9} \]
              10. associate-/l*N/A

                \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
              11. lower-*.f64N/A

                \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
              12. lift-/.f64N/A

                \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
              13. lift-*.f6462.0

                \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
            9. Applied rewrites62.0%

              \[\leadsto \color{blue}{\left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9} \]
            10. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot \color{blue}{9} \]
              2. lift-*.f64N/A

                \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
              3. lift-*.f64N/A

                \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
              4. lift-/.f64N/A

                \[\leadsto \left(x \cdot \frac{y}{c \cdot z}\right) \cdot 9 \]
              5. associate-*l*N/A

                \[\leadsto x \cdot \color{blue}{\left(\frac{y}{c \cdot z} \cdot 9\right)} \]
              6. *-commutativeN/A

                \[\leadsto x \cdot \left(9 \cdot \color{blue}{\frac{y}{c \cdot z}}\right) \]
              7. lower-*.f64N/A

                \[\leadsto x \cdot \color{blue}{\left(9 \cdot \frac{y}{c \cdot z}\right)} \]
              8. *-commutativeN/A

                \[\leadsto x \cdot \left(\frac{y}{c \cdot z} \cdot \color{blue}{9}\right) \]
              9. lower-*.f64N/A

                \[\leadsto x \cdot \left(\frac{y}{c \cdot z} \cdot \color{blue}{9}\right) \]
              10. lift-/.f64N/A

                \[\leadsto x \cdot \left(\frac{y}{c \cdot z} \cdot 9\right) \]
              11. lift-*.f6462.0

                \[\leadsto x \cdot \left(\frac{y}{c \cdot z} \cdot 9\right) \]
            11. Applied rewrites62.0%

              \[\leadsto x \cdot \color{blue}{\left(\frac{y}{c \cdot z} \cdot 9\right)} \]

            if -5.00000000000000024e25 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -9.99999999999999939e-99 or 5.00000000000000035e-230 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999991e111

            1. Initial program 82.9%

              \[\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 0

              \[\leadsto \color{blue}{\left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c}} \]
            3. Step-by-step derivation
              1. fp-cancel-sub-sign-invN/A

                \[\leadsto \left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) + \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \frac{a \cdot t}{c}} \]
              2. metadata-evalN/A

                \[\leadsto \left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) + -4 \cdot \frac{\color{blue}{a \cdot t}}{c} \]
              3. +-commutativeN/A

                \[\leadsto -4 \cdot \frac{a \cdot t}{c} + \color{blue}{\left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right)} \]
              4. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(-4, \color{blue}{\frac{a \cdot t}{c}}, 9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) \]
              5. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{\color{blue}{c}}, 9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) \]
              6. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, 9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) \]
              7. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z} + 9 \cdot \frac{x \cdot y}{c \cdot z}\right) \]
              8. associate-*r/N/A

                \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z} + \frac{9 \cdot \left(x \cdot y\right)}{c \cdot z}\right) \]
              9. div-addN/A

                \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\right) \]
              10. lower-/.f64N/A

                \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\right) \]
              11. +-commutativeN/A

                \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{9 \cdot \left(x \cdot y\right) + b}{c \cdot z}\right) \]
              12. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\left(x \cdot y\right) \cdot 9 + b}{c \cdot z}\right) \]
              13. lower-fma.f64N/A

                \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c \cdot z}\right) \]
              14. *-commutativeN/A

                \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
              15. lower-*.f64N/A

                \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
              16. lower-*.f6489.0

                \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
            4. Applied rewrites89.0%

              \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right)} \]
            5. Taylor expanded in z around inf

              \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
            6. Step-by-step derivation
              1. *-commutativeN/A

                \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
              2. *-commutativeN/A

                \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
              3. *-commutativeN/A

                \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
              4. associate-*l*N/A

                \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
              5. lift-*.f64N/A

                \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
              6. lift-*.f64N/A

                \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
              7. *-commutativeN/A

                \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
              8. associate--r-N/A

                \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
              9. lift-*.f64N/A

                \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
              10. lift-*.f64N/A

                \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
              11. associate-/l/N/A

                \[\leadsto \color{blue}{-4} \cdot \frac{a \cdot t}{c} \]
              12. *-commutativeN/A

                \[\leadsto \frac{a \cdot t}{c} \cdot \color{blue}{-4} \]
            7. Applied rewrites44.5%

              \[\leadsto \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]
            8. Step-by-step derivation
              1. lift-*.f64N/A

                \[\leadsto \frac{a \cdot t}{c} \cdot -4 \]
              2. lift-/.f64N/A

                \[\leadsto \frac{a \cdot t}{c} \cdot -4 \]
              3. associate-/l*N/A

                \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
              4. lower-*.f64N/A

                \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
              5. lower-/.f6446.2

                \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
            9. Applied rewrites46.2%

              \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]

            if -9.99999999999999939e-99 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.00000000000000035e-230

            1. Initial program 81.1%

              \[\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 \frac{\color{blue}{b}}{z \cdot c} \]
            3. Step-by-step derivation
              1. Applied rewrites50.0%

                \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
              2. Step-by-step derivation
                1. lift-/.f64N/A

                  \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]
                2. lift-*.f64N/A

                  \[\leadsto \frac{b}{\color{blue}{z \cdot c}} \]
                3. associate-/r*N/A

                  \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
                4. lower-/.f64N/A

                  \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
              3. Applied rewrites48.9%

                \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
            4. Recombined 3 regimes into one program.
            5. Add Preprocessing

            Alternative 16: 49.2% accurate, 1.5× speedup?

            \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -6.4 \cdot 10^{-81}:\\ \;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+101}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \end{array} \end{array} \]
            (FPCore (x y z t a b c)
             :precision binary64
             (if (<= z -6.4e-81)
               (* (* a (/ t c)) -4.0)
               (if (<= z 7e+101) (/ b (* z c)) (* -4.0 (/ (* a t) c)))))
            double code(double x, double y, double z, double t, double a, double b, double c) {
            	double tmp;
            	if (z <= -6.4e-81) {
            		tmp = (a * (t / c)) * -4.0;
            	} else if (z <= 7e+101) {
            		tmp = b / (z * c);
            	} else {
            		tmp = -4.0 * ((a * t) / 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 (z <= (-6.4d-81)) then
                    tmp = (a * (t / c)) * (-4.0d0)
                else if (z <= 7d+101) then
                    tmp = b / (z * c)
                else
                    tmp = (-4.0d0) * ((a * t) / 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 (z <= -6.4e-81) {
            		tmp = (a * (t / c)) * -4.0;
            	} else if (z <= 7e+101) {
            		tmp = b / (z * c);
            	} else {
            		tmp = -4.0 * ((a * t) / c);
            	}
            	return tmp;
            }
            
            def code(x, y, z, t, a, b, c):
            	tmp = 0
            	if z <= -6.4e-81:
            		tmp = (a * (t / c)) * -4.0
            	elif z <= 7e+101:
            		tmp = b / (z * c)
            	else:
            		tmp = -4.0 * ((a * t) / c)
            	return tmp
            
            function code(x, y, z, t, a, b, c)
            	tmp = 0.0
            	if (z <= -6.4e-81)
            		tmp = Float64(Float64(a * Float64(t / c)) * -4.0);
            	elseif (z <= 7e+101)
            		tmp = Float64(b / Float64(z * c));
            	else
            		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
            	end
            	return tmp
            end
            
            function tmp_2 = code(x, y, z, t, a, b, c)
            	tmp = 0.0;
            	if (z <= -6.4e-81)
            		tmp = (a * (t / c)) * -4.0;
            	elseif (z <= 7e+101)
            		tmp = b / (z * c);
            	else
            		tmp = -4.0 * ((a * t) / c);
            	end
            	tmp_2 = tmp;
            end
            
            code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -6.4e-81], N[(N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] * -4.0), $MachinePrecision], If[LessEqual[z, 7e+101], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]]]
            
            \begin{array}{l}
            
            \\
            \begin{array}{l}
            \mathbf{if}\;z \leq -6.4 \cdot 10^{-81}:\\
            \;\;\;\;\left(a \cdot \frac{t}{c}\right) \cdot -4\\
            
            \mathbf{elif}\;z \leq 7 \cdot 10^{+101}:\\
            \;\;\;\;\frac{b}{z \cdot c}\\
            
            \mathbf{else}:\\
            \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 3 regimes
            2. if z < -6.4e-81

              1. Initial program 70.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 0

                \[\leadsto \color{blue}{\left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c}} \]
              3. Step-by-step derivation
                1. fp-cancel-sub-sign-invN/A

                  \[\leadsto \left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) + \color{blue}{\left(\mathsf{neg}\left(4\right)\right) \cdot \frac{a \cdot t}{c}} \]
                2. metadata-evalN/A

                  \[\leadsto \left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) + -4 \cdot \frac{\color{blue}{a \cdot t}}{c} \]
                3. +-commutativeN/A

                  \[\leadsto -4 \cdot \frac{a \cdot t}{c} + \color{blue}{\left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right)} \]
                4. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(-4, \color{blue}{\frac{a \cdot t}{c}}, 9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) \]
                5. lower-/.f64N/A

                  \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{\color{blue}{c}}, 9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) \]
                6. lower-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, 9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) \]
                7. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z} + 9 \cdot \frac{x \cdot y}{c \cdot z}\right) \]
                8. associate-*r/N/A

                  \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b}{c \cdot z} + \frac{9 \cdot \left(x \cdot y\right)}{c \cdot z}\right) \]
                9. div-addN/A

                  \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\right) \]
                10. lower-/.f64N/A

                  \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{b + 9 \cdot \left(x \cdot y\right)}{c \cdot z}\right) \]
                11. +-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{9 \cdot \left(x \cdot y\right) + b}{c \cdot z}\right) \]
                12. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\left(x \cdot y\right) \cdot 9 + b}{c \cdot z}\right) \]
                13. lower-fma.f64N/A

                  \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(x \cdot y, 9, b\right)}{c \cdot z}\right) \]
                14. *-commutativeN/A

                  \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
                15. lower-*.f64N/A

                  \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
                16. lower-*.f6483.0

                  \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
              4. Applied rewrites83.0%

                \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right)} \]
              5. Taylor expanded in z around inf

                \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
              6. Step-by-step derivation
                1. *-commutativeN/A

                  \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
                2. *-commutativeN/A

                  \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
                3. *-commutativeN/A

                  \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
                4. associate-*l*N/A

                  \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
                5. lift-*.f64N/A

                  \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
                6. lift-*.f64N/A

                  \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
                7. *-commutativeN/A

                  \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
                8. associate--r-N/A

                  \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
                9. lift-*.f64N/A

                  \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
                10. lift-*.f64N/A

                  \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
                11. associate-/l/N/A

                  \[\leadsto \color{blue}{-4} \cdot \frac{a \cdot t}{c} \]
                12. *-commutativeN/A

                  \[\leadsto \frac{a \cdot t}{c} \cdot \color{blue}{-4} \]
              7. Applied rewrites49.2%

                \[\leadsto \color{blue}{\frac{a \cdot t}{c} \cdot -4} \]
              8. Step-by-step derivation
                1. lift-*.f64N/A

                  \[\leadsto \frac{a \cdot t}{c} \cdot -4 \]
                2. lift-/.f64N/A

                  \[\leadsto \frac{a \cdot t}{c} \cdot -4 \]
                3. associate-/l*N/A

                  \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
                4. lower-*.f64N/A

                  \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
                5. lower-/.f6450.2

                  \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]
              9. Applied rewrites50.2%

                \[\leadsto \left(a \cdot \frac{t}{c}\right) \cdot -4 \]

              if -6.4e-81 < z < 7.00000000000000046e101

              1. Initial program 92.9%

                \[\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 \frac{\color{blue}{b}}{z \cdot c} \]
              3. Step-by-step derivation
                1. Applied rewrites44.8%

                  \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]

                if 7.00000000000000046e101 < z

                1. Initial program 54.9%

                  \[\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-*.f6460.4

                    \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
                4. Applied rewrites60.4%

                  \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]
              4. Recombined 3 regimes into one program.
              5. Add Preprocessing

              Alternative 17: 48.9% accurate, 1.5× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := -4 \cdot \frac{a \cdot t}{c}\\ \mathbf{if}\;z \leq -1.4 \cdot 10^{-80}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 7 \cdot 10^{+101}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b c)
               :precision binary64
               (let* ((t_1 (* -4.0 (/ (* a t) c))))
                 (if (<= z -1.4e-80) t_1 (if (<= z 7e+101) (/ b (* z c)) t_1))))
              double code(double x, double y, double z, double t, double a, double b, double c) {
              	double t_1 = -4.0 * ((a * t) / c);
              	double tmp;
              	if (z <= -1.4e-80) {
              		tmp = t_1;
              	} else if (z <= 7e+101) {
              		tmp = b / (z * c);
              	} 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 = (-4.0d0) * ((a * t) / c)
                  if (z <= (-1.4d-80)) then
                      tmp = t_1
                  else if (z <= 7d+101) then
                      tmp = b / (z * c)
                  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 = -4.0 * ((a * t) / c);
              	double tmp;
              	if (z <= -1.4e-80) {
              		tmp = t_1;
              	} else if (z <= 7e+101) {
              		tmp = b / (z * c);
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b, c):
              	t_1 = -4.0 * ((a * t) / c)
              	tmp = 0
              	if z <= -1.4e-80:
              		tmp = t_1
              	elif z <= 7e+101:
              		tmp = b / (z * c)
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t, a, b, c)
              	t_1 = Float64(-4.0 * Float64(Float64(a * t) / c))
              	tmp = 0.0
              	if (z <= -1.4e-80)
              		tmp = t_1;
              	elseif (z <= 7e+101)
              		tmp = Float64(b / Float64(z * c));
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b, c)
              	t_1 = -4.0 * ((a * t) / c);
              	tmp = 0.0;
              	if (z <= -1.4e-80)
              		tmp = t_1;
              	elseif (z <= 7e+101)
              		tmp = b / (z * c);
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.4e-80], t$95$1, If[LessEqual[z, 7e+101], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := -4 \cdot \frac{a \cdot t}{c}\\
              \mathbf{if}\;z \leq -1.4 \cdot 10^{-80}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;z \leq 7 \cdot 10^{+101}:\\
              \;\;\;\;\frac{b}{z \cdot c}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if z < -1.39999999999999995e-80 or 7.00000000000000046e101 < z

                1. Initial program 64.8%

                  \[\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-*.f6453.3

                    \[\leadsto -4 \cdot \frac{a \cdot t}{c} \]
                4. Applied rewrites53.3%

                  \[\leadsto \color{blue}{-4 \cdot \frac{a \cdot t}{c}} \]

                if -1.39999999999999995e-80 < z < 7.00000000000000046e101

                1. Initial program 92.9%

                  \[\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 \frac{\color{blue}{b}}{z \cdot c} \]
                3. Step-by-step derivation
                  1. Applied rewrites44.8%

                    \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
                4. Recombined 2 regimes into one program.
                5. Add Preprocessing

                Alternative 18: 34.6% accurate, 2.4× speedup?

                \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;a \leq 4.5 \cdot 10^{+57}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \end{array} \end{array} \]
                (FPCore (x y z t a b c)
                 :precision binary64
                 (if (<= a 4.5e+57) (/ (/ b z) c) (/ b (* z c))))
                double code(double x, double y, double z, double t, double a, double b, double c) {
                	double tmp;
                	if (a <= 4.5e+57) {
                		tmp = (b / z) / c;
                	} else {
                		tmp = b / (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) :: tmp
                    if (a <= 4.5d+57) then
                        tmp = (b / z) / c
                    else
                        tmp = b / (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 tmp;
                	if (a <= 4.5e+57) {
                		tmp = (b / z) / c;
                	} else {
                		tmp = b / (z * c);
                	}
                	return tmp;
                }
                
                def code(x, y, z, t, a, b, c):
                	tmp = 0
                	if a <= 4.5e+57:
                		tmp = (b / z) / c
                	else:
                		tmp = b / (z * c)
                	return tmp
                
                function code(x, y, z, t, a, b, c)
                	tmp = 0.0
                	if (a <= 4.5e+57)
                		tmp = Float64(Float64(b / z) / c);
                	else
                		tmp = Float64(b / Float64(z * c));
                	end
                	return tmp
                end
                
                function tmp_2 = code(x, y, z, t, a, b, c)
                	tmp = 0.0;
                	if (a <= 4.5e+57)
                		tmp = (b / z) / c;
                	else
                		tmp = b / (z * c);
                	end
                	tmp_2 = tmp;
                end
                
                code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, 4.5e+57], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]]
                
                \begin{array}{l}
                
                \\
                \begin{array}{l}
                \mathbf{if}\;a \leq 4.5 \cdot 10^{+57}:\\
                \;\;\;\;\frac{\frac{b}{z}}{c}\\
                
                \mathbf{else}:\\
                \;\;\;\;\frac{b}{z \cdot c}\\
                
                
                \end{array}
                \end{array}
                
                Derivation
                1. Split input into 2 regimes
                2. if a < 4.49999999999999996e57

                  1. Initial program 79.7%

                    \[\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 \frac{\color{blue}{b}}{z \cdot c} \]
                  3. Step-by-step derivation
                    1. Applied rewrites36.5%

                      \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
                    2. Step-by-step derivation
                      1. lift-/.f64N/A

                        \[\leadsto \color{blue}{\frac{b}{z \cdot c}} \]
                      2. lift-*.f64N/A

                        \[\leadsto \frac{b}{\color{blue}{z \cdot c}} \]
                      3. associate-/r*N/A

                        \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
                      4. lower-/.f64N/A

                        \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
                    3. Applied rewrites35.3%

                      \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]

                    if 4.49999999999999996e57 < a

                    1. Initial program 77.9%

                      \[\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 \frac{\color{blue}{b}}{z \cdot c} \]
                    3. Step-by-step derivation
                      1. Applied rewrites27.2%

                        \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
                    4. Recombined 2 regimes into one program.
                    5. Add Preprocessing

                    Alternative 19: 33.6% accurate, 3.8× speedup?

                    \[\begin{array}{l} \\ \frac{b}{z \cdot c} \end{array} \]
                    (FPCore (x y z t a b c) :precision binary64 (/ b (* z c)))
                    double code(double x, double y, double z, double t, double a, double b, double c) {
                    	return 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 = b / (z * c)
                    end function
                    
                    public static double code(double x, double y, double z, double t, double a, double b, double c) {
                    	return b / (z * c);
                    }
                    
                    def code(x, y, z, t, a, b, c):
                    	return b / (z * c)
                    
                    function code(x, y, z, t, a, b, c)
                    	return Float64(b / Float64(z * c))
                    end
                    
                    function tmp = code(x, y, z, t, a, b, c)
                    	tmp = b / (z * c);
                    end
                    
                    code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision]
                    
                    \begin{array}{l}
                    
                    \\
                    \frac{b}{z \cdot c}
                    \end{array}
                    
                    Derivation
                    1. Initial program 79.3%

                      \[\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 \frac{\color{blue}{b}}{z \cdot c} \]
                    3. Step-by-step derivation
                      1. Applied rewrites34.6%

                        \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
                      2. Add Preprocessing

                      Reproduce

                      ?
                      herbie shell --seed 2025120 
                      (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)))