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

Percentage Accurate: 79.3% → 88.1%
Time: 9.4s
Alternatives: 18
Speedup: 0.6×

Specification

?
\[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
(FPCore (x y z t a b c)
 :precision binary64
 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 18 alternatives:

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

Initial Program: 79.3% accurate, 1.0× speedup?

\[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
(FPCore (x y z t a b c)
 :precision binary64
 (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))
double code(double x, double y, double z, double t, double a, double b, double c) {
	return ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

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

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

Alternative 1: 88.1% accurate, 0.4× speedup?

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

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

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

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


\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -2.0000000000000001e238

    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. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -2.0000000000000001e238 < z < -5.9999999999999998e54

    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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.9999999999999998e54 < z < 3.3e68

    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. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.3e68 < z

    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 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. lower-*.f64N/A

        \[\leadsto -1 \cdot \color{blue}{\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-*.f64N/A

        \[\leadsto -1 \cdot \left(x \cdot \color{blue}{\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. lower-fma.f64N/A

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

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

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

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

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

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

Alternative 2: 84.6% accurate, 0.2× speedup?

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

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

\mathbf{elif}\;t\_1 \leq \infty:\\
\;\;\;\;t\_2\\

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


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

    1. Initial program 79.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{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1e-209 < (/.f64 (+.f64 (-.f64 (*.f64 (*.f64 x #s(literal 9 binary64)) y) (*.f64 (*.f64 (*.f64 z #s(literal 4 binary64)) t) a)) b) (*.f64 z c)) < 5.0000000000000003e-302

    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. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 84.6% accurate, 0.6× speedup?

\[\mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l} \mathbf{if}\;\left|c\right| \leq 5 \cdot 10^{+74}:\\ \;\;\;\;\frac{\mathsf{fma}\left(\mathsf{max}\left(x, y\right) \cdot 9, \mathsf{min}\left(x, y\right), \mathsf{fma}\left(-4, \left(a \cdot t\right) \cdot z, b\right)\right)}{z \cdot \left|c\right|}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{\mathsf{fma}\left(a \cdot \left(-4 \cdot z\right), t, \mathsf{fma}\left(\mathsf{max}\left(x, y\right) \cdot \mathsf{min}\left(x, y\right), 9, b\right)\right)}{\left|c\right|}}{z}\\ \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (*
  (copysign 1.0 c)
  (if (<= (fabs c) 5e+74)
    (/
     (fma (* (fmax x y) 9.0) (fmin x y) (fma -4.0 (* (* a t) z) b))
     (* z (fabs c)))
    (/
     (/
      (fma (* a (* -4.0 z)) t (fma (* (fmax x y) (fmin x y)) 9.0 b))
      (fabs c))
     z))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (fabs(c) <= 5e+74) {
		tmp = fma((fmax(x, y) * 9.0), fmin(x, y), fma(-4.0, ((a * t) * z), b)) / (z * fabs(c));
	} else {
		tmp = (fma((a * (-4.0 * z)), t, fma((fmax(x, y) * fmin(x, y)), 9.0, b)) / fabs(c)) / z;
	}
	return copysign(1.0, c) * tmp;
}
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (abs(c) <= 5e+74)
		tmp = Float64(fma(Float64(fmax(x, y) * 9.0), fmin(x, y), fma(-4.0, Float64(Float64(a * t) * z), b)) / Float64(z * abs(c)));
	else
		tmp = Float64(Float64(fma(Float64(a * Float64(-4.0 * z)), t, fma(Float64(fmax(x, y) * fmin(x, y)), 9.0, b)) / abs(c)) / z);
	end
	return Float64(copysign(1.0, c) * tmp)
end
code[x_, y_, z_, t_, a_, b_, c_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[c], $MachinePrecision], 5e+74], N[(N[(N[(N[Max[x, y], $MachinePrecision] * 9.0), $MachinePrecision] * N[Min[x, y], $MachinePrecision] + N[(-4.0 * N[(N[(a * t), $MachinePrecision] * z), $MachinePrecision] + b), $MachinePrecision]), $MachinePrecision] / N[(z * N[Abs[c], $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(N[(N[(a * N[(-4.0 * z), $MachinePrecision]), $MachinePrecision] * t + N[(N[(N[Max[x, y], $MachinePrecision] * N[Min[x, y], $MachinePrecision]), $MachinePrecision] * 9.0 + b), $MachinePrecision]), $MachinePrecision] / N[Abs[c], $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]
\mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l}
\mathbf{if}\;\left|c\right| \leq 5 \cdot 10^{+74}:\\
\;\;\;\;\frac{\mathsf{fma}\left(\mathsf{max}\left(x, y\right) \cdot 9, \mathsf{min}\left(x, y\right), \mathsf{fma}\left(-4, \left(a \cdot t\right) \cdot z, b\right)\right)}{z \cdot \left|c\right|}\\

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


\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < 4.9999999999999996e74

    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. Step-by-step derivation
      1. lift-+.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.9999999999999996e74 < c

    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. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

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

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

Alternative 4: 84.1% accurate, 0.3× speedup?

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

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


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

    1. Initial program 79.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{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 83.8% accurate, 0.4× speedup?

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

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


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

    1. Initial program 79.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{\color{blue}{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}}{z \cdot c} \]
      2. lift--.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 69.8% accurate, 0.6× speedup?

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

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

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


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

    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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\leadsto \frac{9 \cdot \left(x \cdot y\right) - \left(\left(4 \cdot a\right) \cdot t\right) \cdot z}{c \cdot z} \]
    6. Applied rewrites57.2%

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

    if -3.9999999999999997e45 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2e-140

    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 x around 0

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

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

        \[\leadsto \frac{-4 \cdot \left(a \cdot \color{blue}{\left(t \cdot z\right)}\right) + b}{z \cdot c} \]
      3. lower-*.f6456.0%

        \[\leadsto \frac{-4 \cdot \left(a \cdot \left(t \cdot \color{blue}{z}\right)\right) + b}{z \cdot c} \]
    4. Applied rewrites56.0%

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

    if 2e-140 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    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 z around 0

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

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

        \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
      3. lower-*.f6459.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}} \]
      6. lower-/.f6460.8%

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

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

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

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

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

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

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

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

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

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

Alternative 7: 69.7% accurate, 0.6× speedup?

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

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

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


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

    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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.9999999999999997e45 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2e-140

    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 x around 0

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

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

        \[\leadsto \frac{-4 \cdot \left(a \cdot \color{blue}{\left(t \cdot z\right)}\right) + b}{z \cdot c} \]
      3. lower-*.f6456.0%

        \[\leadsto \frac{-4 \cdot \left(a \cdot \left(t \cdot \color{blue}{z}\right)\right) + b}{z \cdot c} \]
    4. Applied rewrites56.0%

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

    if 2e-140 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

    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 z around 0

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

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

        \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
      3. lower-*.f6459.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}} \]
      6. lower-/.f6460.8%

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

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

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

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

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

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

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

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

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

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

Alternative 8: 69.6% accurate, 0.7× speedup?

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

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

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


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

    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 z around 0

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

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

        \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
      3. lower-*.f6459.7%

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

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

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

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

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

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

        \[\leadsto \color{blue}{\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}} \]
      6. lower-/.f6460.8%

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

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

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

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

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

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

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

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

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

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

    if -1e116 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2e-140

    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. Step-by-step derivation
      1. lift-/.f64N/A

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

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

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

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

      \[\leadsto \mathsf{fma}\left(a \cdot \left(-4 \cdot z\right), t, \color{blue}{b}\right) \cdot \frac{1}{c \cdot z} \]
    5. Step-by-step derivation
      1. Applied rewrites55.6%

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

    Alternative 9: 69.3% accurate, 0.6× speedup?

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

      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 z around 0

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

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

          \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
        3. lower-*.f6459.7%

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

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

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

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

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

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

          \[\leadsto \color{blue}{\frac{\frac{b + 9 \cdot \left(x \cdot y\right)}{c}}{z}} \]
        6. lower-/.f6460.8%

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

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

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

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

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

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

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

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

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

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

      if -2e104 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2e-140

      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 x around 0

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

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

          \[\leadsto \frac{-4 \cdot \left(a \cdot \color{blue}{\left(t \cdot z\right)}\right) + b}{z \cdot c} \]
        3. lower-*.f6456.0%

          \[\leadsto \frac{-4 \cdot \left(a \cdot \left(t \cdot \color{blue}{z}\right)\right) + b}{z \cdot c} \]
      4. Applied rewrites56.0%

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

    Alternative 10: 65.2% accurate, 1.2× speedup?

    \[\begin{array}{l} \mathbf{if}\;a \leq -1.85 \cdot 10^{+88}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{+75}:\\ \;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \end{array} \]
    (FPCore (x y z t a b c)
     :precision binary64
     (if (<= a -1.85e+88)
       (* -4.0 (/ (* a t) c))
       (if (<= a 6.1e+75) (/ (fma (* y x) 9.0 b) (* z c)) (* t (* -4.0 (/ a c))))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (a <= -1.85e+88) {
    		tmp = -4.0 * ((a * t) / c);
    	} else if (a <= 6.1e+75) {
    		tmp = fma((y * x), 9.0, b) / (z * c);
    	} else {
    		tmp = t * (-4.0 * (a / c));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c)
    	tmp = 0.0
    	if (a <= -1.85e+88)
    		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
    	elseif (a <= 6.1e+75)
    		tmp = Float64(fma(Float64(y * x), 9.0, b) / Float64(z * c));
    	else
    		tmp = Float64(t * Float64(-4.0 * Float64(a / c)));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, -1.85e+88], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.1e+75], N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    \mathbf{if}\;a \leq -1.85 \cdot 10^{+88}:\\
    \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
    
    \mathbf{elif}\;a \leq 6.1 \cdot 10^{+75}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c}\\
    
    \mathbf{else}:\\
    \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if a < -1.85e88

      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 z around inf

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

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

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

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

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

      if -1.85e88 < a < 6.1000000000000001e75

      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 z around 0

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

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

          \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
        3. lower-*.f6459.7%

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

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

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

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

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

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

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

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

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

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

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

      if 6.1000000000000001e75 < a

      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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 11: 65.2% accurate, 1.0× speedup?

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

      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 z around inf

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

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

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

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

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

      if -1.85e88 < a < 6.1000000000000001e75

      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 z around 0

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

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

          \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
        3. lower-*.f6459.7%

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.1000000000000001e75 < a

      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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 12: 65.2% accurate, 1.2× speedup?

    \[\begin{array}{l} \mathbf{if}\;a \leq -1.85 \cdot 10^{+88}:\\ \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\ \mathbf{elif}\;a \leq 6.1 \cdot 10^{+75}:\\ \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \end{array} \]
    (FPCore (x y z t a b c)
     :precision binary64
     (if (<= a -1.85e+88)
       (* -4.0 (/ (* a t) c))
       (if (<= a 6.1e+75) (/ (fma (* 9.0 x) y b) (* z c)) (* t (* -4.0 (/ a c))))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (a <= -1.85e+88) {
    		tmp = -4.0 * ((a * t) / c);
    	} else if (a <= 6.1e+75) {
    		tmp = fma((9.0 * x), y, b) / (z * c);
    	} else {
    		tmp = t * (-4.0 * (a / c));
    	}
    	return tmp;
    }
    
    function code(x, y, z, t, a, b, c)
    	tmp = 0.0
    	if (a <= -1.85e+88)
    		tmp = Float64(-4.0 * Float64(Float64(a * t) / c));
    	elseif (a <= 6.1e+75)
    		tmp = Float64(fma(Float64(9.0 * x), y, b) / Float64(z * c));
    	else
    		tmp = Float64(t * Float64(-4.0 * Float64(a / c)));
    	end
    	return tmp
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[a, -1.85e+88], N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], If[LessEqual[a, 6.1e+75], N[(N[(N[(9.0 * x), $MachinePrecision] * y + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    \mathbf{if}\;a \leq -1.85 \cdot 10^{+88}:\\
    \;\;\;\;-4 \cdot \frac{a \cdot t}{c}\\
    
    \mathbf{elif}\;a \leq 6.1 \cdot 10^{+75}:\\
    \;\;\;\;\frac{\mathsf{fma}\left(9 \cdot x, y, b\right)}{z \cdot c}\\
    
    \mathbf{else}:\\
    \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if a < -1.85e88

      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 z around inf

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

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

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

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

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

      if -1.85e88 < a < 6.1000000000000001e75

      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 z around 0

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

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

          \[\leadsto \frac{b + 9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
        3. lower-*.f6459.7%

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

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

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

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

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

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

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

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

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

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

      if 6.1000000000000001e75 < a

      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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    Alternative 13: 51.3% accurate, 0.6× speedup?

    \[\begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{9 \cdot \frac{x \cdot y}{c}}{z}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+116}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-190}:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+62}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
    (FPCore (x y z t a b c)
     :precision binary64
     (let* ((t_1 (* (* x 9.0) y)) (t_2 (/ (* 9.0 (/ (* x y) c)) z)))
       (if (<= t_1 -1e+116)
         t_2
         (if (<= t_1 -1e-190)
           (* t (* -4.0 (/ a c)))
           (if (<= t_1 2e+62) (/ (/ 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 = (9.0 * ((x * y) / c)) / z;
    	double tmp;
    	if (t_1 <= -1e+116) {
    		tmp = t_2;
    	} else if (t_1 <= -1e-190) {
    		tmp = t * (-4.0 * (a / c));
    	} else if (t_1 <= 2e+62) {
    		tmp = (b / z) / c;
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: tmp
        t_1 = (x * 9.0d0) * y
        t_2 = (9.0d0 * ((x * y) / c)) / z
        if (t_1 <= (-1d+116)) then
            tmp = t_2
        else if (t_1 <= (-1d-190)) then
            tmp = t * ((-4.0d0) * (a / c))
        else if (t_1 <= 2d+62) then
            tmp = (b / z) / c
        else
            tmp = t_2
        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 t_2 = (9.0 * ((x * y) / c)) / z;
    	double tmp;
    	if (t_1 <= -1e+116) {
    		tmp = t_2;
    	} else if (t_1 <= -1e-190) {
    		tmp = t * (-4.0 * (a / c));
    	} else if (t_1 <= 2e+62) {
    		tmp = (b / z) / c;
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	t_1 = (x * 9.0) * y
    	t_2 = (9.0 * ((x * y) / c)) / z
    	tmp = 0
    	if t_1 <= -1e+116:
    		tmp = t_2
    	elif t_1 <= -1e-190:
    		tmp = t * (-4.0 * (a / c))
    	elif t_1 <= 2e+62:
    		tmp = (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(9.0 * Float64(Float64(x * y) / c)) / z)
    	tmp = 0.0
    	if (t_1 <= -1e+116)
    		tmp = t_2;
    	elseif (t_1 <= -1e-190)
    		tmp = Float64(t * Float64(-4.0 * Float64(a / c)));
    	elseif (t_1 <= 2e+62)
    		tmp = Float64(Float64(b / z) / c);
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	t_1 = (x * 9.0) * y;
    	t_2 = (9.0 * ((x * y) / c)) / z;
    	tmp = 0.0;
    	if (t_1 <= -1e+116)
    		tmp = t_2;
    	elseif (t_1 <= -1e-190)
    		tmp = t * (-4.0 * (a / c));
    	elseif (t_1 <= 2e+62)
    		tmp = (b / z) / c;
    	else
    		tmp = t_2;
    	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]}, Block[{t$95$2 = N[(N[(9.0 * N[(N[(x * y), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+116], t$95$2, If[LessEqual[t$95$1, -1e-190], N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+62], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], t$95$2]]]]]
    
    \begin{array}{l}
    t_1 := \left(x \cdot 9\right) \cdot y\\
    t_2 := \frac{9 \cdot \frac{x \cdot y}{c}}{z}\\
    \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+116}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-190}:\\
    \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\
    
    \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+62}:\\
    \;\;\;\;\frac{\frac{b}{z}}{c}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1e116 or 2.0000000000000001e62 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

      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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1e116 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1e-190

      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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1e-190 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.0000000000000001e62

      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 \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.4%

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.4%

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

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

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        6. associate-/r*N/A

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

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

          \[\leadsto \frac{\frac{b}{z}}{c} \]
      6. Applied rewrites33.4%

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

    Alternative 14: 50.5% accurate, 0.6× speedup?

    \[\begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := 9 \cdot \frac{x \cdot y}{c \cdot z}\\ \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+116}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-190}:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+62}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \mathbf{else}:\\ \;\;\;\;t\_2\\ \end{array} \]
    (FPCore (x y z t a b c)
     :precision binary64
     (let* ((t_1 (* (* x 9.0) y)) (t_2 (* 9.0 (/ (* x y) (* c z)))))
       (if (<= t_1 -1e+116)
         t_2
         (if (<= t_1 -1e-190)
           (* t (* -4.0 (/ a c)))
           (if (<= t_1 2e+62) (/ (/ 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 = 9.0 * ((x * y) / (c * z));
    	double tmp;
    	if (t_1 <= -1e+116) {
    		tmp = t_2;
    	} else if (t_1 <= -1e-190) {
    		tmp = t * (-4.0 * (a / c));
    	} else if (t_1 <= 2e+62) {
    		tmp = (b / z) / c;
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        real(8) :: t_1
        real(8) :: t_2
        real(8) :: tmp
        t_1 = (x * 9.0d0) * y
        t_2 = 9.0d0 * ((x * y) / (c * z))
        if (t_1 <= (-1d+116)) then
            tmp = t_2
        else if (t_1 <= (-1d-190)) then
            tmp = t * ((-4.0d0) * (a / c))
        else if (t_1 <= 2d+62) then
            tmp = (b / z) / c
        else
            tmp = t_2
        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 t_2 = 9.0 * ((x * y) / (c * z));
    	double tmp;
    	if (t_1 <= -1e+116) {
    		tmp = t_2;
    	} else if (t_1 <= -1e-190) {
    		tmp = t * (-4.0 * (a / c));
    	} else if (t_1 <= 2e+62) {
    		tmp = (b / z) / c;
    	} else {
    		tmp = t_2;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	t_1 = (x * 9.0) * y
    	t_2 = 9.0 * ((x * y) / (c * z))
    	tmp = 0
    	if t_1 <= -1e+116:
    		tmp = t_2
    	elif t_1 <= -1e-190:
    		tmp = t * (-4.0 * (a / c))
    	elif t_1 <= 2e+62:
    		tmp = (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(9.0 * Float64(Float64(x * y) / Float64(c * z)))
    	tmp = 0.0
    	if (t_1 <= -1e+116)
    		tmp = t_2;
    	elseif (t_1 <= -1e-190)
    		tmp = Float64(t * Float64(-4.0 * Float64(a / c)));
    	elseif (t_1 <= 2e+62)
    		tmp = Float64(Float64(b / z) / c);
    	else
    		tmp = t_2;
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	t_1 = (x * 9.0) * y;
    	t_2 = 9.0 * ((x * y) / (c * z));
    	tmp = 0.0;
    	if (t_1 <= -1e+116)
    		tmp = t_2;
    	elseif (t_1 <= -1e-190)
    		tmp = t * (-4.0 * (a / c));
    	elseif (t_1 <= 2e+62)
    		tmp = (b / z) / c;
    	else
    		tmp = t_2;
    	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]}, Block[{t$95$2 = N[(9.0 * N[(N[(x * y), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -1e+116], t$95$2, If[LessEqual[t$95$1, -1e-190], N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[t$95$1, 2e+62], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision], t$95$2]]]]]
    
    \begin{array}{l}
    t_1 := \left(x \cdot 9\right) \cdot y\\
    t_2 := 9 \cdot \frac{x \cdot y}{c \cdot z}\\
    \mathbf{if}\;t\_1 \leq -1 \cdot 10^{+116}:\\
    \;\;\;\;t\_2\\
    
    \mathbf{elif}\;t\_1 \leq -1 \cdot 10^{-190}:\\
    \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\
    
    \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{+62}:\\
    \;\;\;\;\frac{\frac{b}{z}}{c}\\
    
    \mathbf{else}:\\
    \;\;\;\;t\_2\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1e116 or 2.0000000000000001e62 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

      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 x around inf

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

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

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

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

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

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

      if -1e116 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < -1e-190

      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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1e-190 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.0000000000000001e62

      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 \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.4%

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.4%

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

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

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        6. associate-/r*N/A

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

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

          \[\leadsto \frac{\frac{b}{z}}{c} \]
      6. Applied rewrites33.4%

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

    Alternative 15: 48.4% accurate, 1.5× speedup?

    \[\begin{array}{l} \mathbf{if}\;b \leq -1.75 \cdot 10^{+130}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{+124}:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{b}{z} \cdot \frac{1}{c}\\ \end{array} \]
    (FPCore (x y z t a b c)
     :precision binary64
     (if (<= b -1.75e+130)
       (/ b (* c z))
       (if (<= b 1.6e+124) (* t (* -4.0 (/ a c))) (* (/ b z) (/ 1.0 c)))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (b <= -1.75e+130) {
    		tmp = b / (c * z);
    	} else if (b <= 1.6e+124) {
    		tmp = t * (-4.0 * (a / c));
    	} else {
    		tmp = (b / z) * (1.0 / 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 (b <= (-1.75d+130)) then
            tmp = b / (c * z)
        else if (b <= 1.6d+124) then
            tmp = t * ((-4.0d0) * (a / c))
        else
            tmp = (b / z) * (1.0d0 / 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 (b <= -1.75e+130) {
    		tmp = b / (c * z);
    	} else if (b <= 1.6e+124) {
    		tmp = t * (-4.0 * (a / c));
    	} else {
    		tmp = (b / z) * (1.0 / c);
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	tmp = 0
    	if b <= -1.75e+130:
    		tmp = b / (c * z)
    	elif b <= 1.6e+124:
    		tmp = t * (-4.0 * (a / c))
    	else:
    		tmp = (b / z) * (1.0 / c)
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	tmp = 0.0
    	if (b <= -1.75e+130)
    		tmp = Float64(b / Float64(c * z));
    	elseif (b <= 1.6e+124)
    		tmp = Float64(t * Float64(-4.0 * Float64(a / c)));
    	else
    		tmp = Float64(Float64(b / z) * Float64(1.0 / c));
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	tmp = 0.0;
    	if (b <= -1.75e+130)
    		tmp = b / (c * z);
    	elseif (b <= 1.6e+124)
    		tmp = t * (-4.0 * (a / c));
    	else
    		tmp = (b / z) * (1.0 / c);
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -1.75e+130], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.6e+124], N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / z), $MachinePrecision] * N[(1.0 / c), $MachinePrecision]), $MachinePrecision]]]
    
    \begin{array}{l}
    \mathbf{if}\;b \leq -1.75 \cdot 10^{+130}:\\
    \;\;\;\;\frac{b}{c \cdot z}\\
    
    \mathbf{elif}\;b \leq 1.6 \cdot 10^{+124}:\\
    \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{b}{z} \cdot \frac{1}{c}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b < -1.75e130

      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 \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.4%

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.4%

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

      if -1.75e130 < b < 1.6e124

      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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.6e124 < b

      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 \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.4%

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.4%

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

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

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        6. associate-/r*N/A

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

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

          \[\leadsto \frac{\frac{b}{z}}{c} \]
      6. Applied rewrites33.4%

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

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

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

          \[\leadsto \frac{b}{z} \cdot \frac{1}{\color{blue}{c}} \]
        4. lower-*.f6433.3%

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

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

    Alternative 16: 48.4% accurate, 1.5× speedup?

    \[\begin{array}{l} \mathbf{if}\;b \leq -1.75 \cdot 10^{+130}:\\ \;\;\;\;\frac{b}{c \cdot z}\\ \mathbf{elif}\;b \leq 1.6 \cdot 10^{+124}:\\ \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{z}}{c}\\ \end{array} \]
    (FPCore (x y z t a b c)
     :precision binary64
     (if (<= b -1.75e+130)
       (/ b (* c z))
       (if (<= b 1.6e+124) (* t (* -4.0 (/ a c))) (/ (/ b z) c))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (b <= -1.75e+130) {
    		tmp = b / (c * z);
    	} else if (b <= 1.6e+124) {
    		tmp = t * (-4.0 * (a / 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 (b <= (-1.75d+130)) then
            tmp = b / (c * z)
        else if (b <= 1.6d+124) then
            tmp = t * ((-4.0d0) * (a / 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 (b <= -1.75e+130) {
    		tmp = b / (c * z);
    	} else if (b <= 1.6e+124) {
    		tmp = t * (-4.0 * (a / c));
    	} else {
    		tmp = (b / z) / c;
    	}
    	return tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	tmp = 0
    	if b <= -1.75e+130:
    		tmp = b / (c * z)
    	elif b <= 1.6e+124:
    		tmp = t * (-4.0 * (a / c))
    	else:
    		tmp = (b / z) / c
    	return tmp
    
    function code(x, y, z, t, a, b, c)
    	tmp = 0.0
    	if (b <= -1.75e+130)
    		tmp = Float64(b / Float64(c * z));
    	elseif (b <= 1.6e+124)
    		tmp = Float64(t * Float64(-4.0 * Float64(a / c)));
    	else
    		tmp = Float64(Float64(b / z) / c);
    	end
    	return tmp
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	tmp = 0.0;
    	if (b <= -1.75e+130)
    		tmp = b / (c * z);
    	elseif (b <= 1.6e+124)
    		tmp = t * (-4.0 * (a / c));
    	else
    		tmp = (b / z) / c;
    	end
    	tmp_2 = tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[b, -1.75e+130], N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.6e+124], N[(t * N[(-4.0 * N[(a / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(b / z), $MachinePrecision] / c), $MachinePrecision]]]
    
    \begin{array}{l}
    \mathbf{if}\;b \leq -1.75 \cdot 10^{+130}:\\
    \;\;\;\;\frac{b}{c \cdot z}\\
    
    \mathbf{elif}\;b \leq 1.6 \cdot 10^{+124}:\\
    \;\;\;\;t \cdot \left(-4 \cdot \frac{a}{c}\right)\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\frac{b}{z}}{c}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 3 regimes
    2. if b < -1.75e130

      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 \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.4%

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.4%

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

      if -1.75e130 < b < 1.6e124

      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 0

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 1.6e124 < b

      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 \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.4%

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.4%

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

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

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
        3. *-commutativeN/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        4. lift-*.f64N/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        5. lift-*.f64N/A

          \[\leadsto \frac{b}{z \cdot \color{blue}{c}} \]
        6. associate-/r*N/A

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

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

          \[\leadsto \frac{\frac{b}{z}}{c} \]
      6. Applied rewrites33.4%

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

    Alternative 17: 35.4% accurate, 1.4× speedup?

    \[\mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l} \mathbf{if}\;\left|c\right| \leq 2 \cdot 10^{+67}:\\ \;\;\;\;\frac{b}{\left|c\right| \cdot z}\\ \mathbf{else}:\\ \;\;\;\;\frac{\frac{b}{\left|c\right|}}{z}\\ \end{array} \]
    (FPCore (x y z t a b c)
     :precision binary64
     (*
      (copysign 1.0 c)
      (if (<= (fabs c) 2e+67) (/ b (* (fabs c) z)) (/ (/ b (fabs c)) z))))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (fabs(c) <= 2e+67) {
    		tmp = b / (fabs(c) * z);
    	} else {
    		tmp = (b / fabs(c)) / z;
    	}
    	return copysign(1.0, c) * tmp;
    }
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	double tmp;
    	if (Math.abs(c) <= 2e+67) {
    		tmp = b / (Math.abs(c) * z);
    	} else {
    		tmp = (b / Math.abs(c)) / z;
    	}
    	return Math.copySign(1.0, c) * tmp;
    }
    
    def code(x, y, z, t, a, b, c):
    	tmp = 0
    	if math.fabs(c) <= 2e+67:
    		tmp = b / (math.fabs(c) * z)
    	else:
    		tmp = (b / math.fabs(c)) / z
    	return math.copysign(1.0, c) * tmp
    
    function code(x, y, z, t, a, b, c)
    	tmp = 0.0
    	if (abs(c) <= 2e+67)
    		tmp = Float64(b / Float64(abs(c) * z));
    	else
    		tmp = Float64(Float64(b / abs(c)) / z);
    	end
    	return Float64(copysign(1.0, c) * tmp)
    end
    
    function tmp_2 = code(x, y, z, t, a, b, c)
    	tmp = 0.0;
    	if (abs(c) <= 2e+67)
    		tmp = b / (abs(c) * z);
    	else
    		tmp = (b / abs(c)) / z;
    	end
    	tmp_2 = (sign(c) * abs(1.0)) * tmp;
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := N[(N[With[{TMP1 = Abs[1.0], TMP2 = Sign[c]}, TMP1 * If[TMP2 == 0, 1, TMP2]], $MachinePrecision] * If[LessEqual[N[Abs[c], $MachinePrecision], 2e+67], N[(b / N[(N[Abs[c], $MachinePrecision] * z), $MachinePrecision]), $MachinePrecision], N[(N[(b / N[Abs[c], $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision]]), $MachinePrecision]
    
    \mathsf{copysign}\left(1, c\right) \cdot \begin{array}{l}
    \mathbf{if}\;\left|c\right| \leq 2 \cdot 10^{+67}:\\
    \;\;\;\;\frac{b}{\left|c\right| \cdot z}\\
    
    \mathbf{else}:\\
    \;\;\;\;\frac{\frac{b}{\left|c\right|}}{z}\\
    
    
    \end{array}
    
    Derivation
    1. Split input into 2 regimes
    2. if c < 2e67

      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 \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.4%

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.4%

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

      if 2e67 < c

      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 \color{blue}{\frac{b}{c \cdot z}} \]
      3. Step-by-step derivation
        1. lower-/.f64N/A

          \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
        2. lower-*.f6434.4%

          \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
      4. Applied rewrites34.4%

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

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

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

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

          \[\leadsto \frac{\frac{b}{c}}{\color{blue}{z}} \]
        5. lower-/.f6434.3%

          \[\leadsto \frac{\frac{b}{c}}{z} \]
      6. Applied rewrites34.3%

        \[\leadsto \frac{\frac{b}{c}}{\color{blue}{z}} \]
    3. Recombined 2 regimes into one program.
    4. Add Preprocessing

    Alternative 18: 34.4% accurate, 3.6× speedup?

    \[\frac{b}{c \cdot z} \]
    (FPCore (x y z t a b c) :precision binary64 (/ b (* c z)))
    double code(double x, double y, double z, double t, double a, double b, double c) {
    	return b / (c * z);
    }
    
    module fmin_fmax_functions
        implicit none
        private
        public fmax
        public fmin
    
        interface fmax
            module procedure fmax88
            module procedure fmax44
            module procedure fmax84
            module procedure fmax48
        end interface
        interface fmin
            module procedure fmin88
            module procedure fmin44
            module procedure fmin84
            module procedure fmin48
        end interface
    contains
        real(8) function fmax88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(4) function fmax44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, max(x, y), y /= y), x /= x)
        end function
        real(8) function fmax84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmax48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
        end function
        real(8) function fmin88(x, y) result (res)
            real(8), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(4) function fmin44(x, y) result (res)
            real(4), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(y, merge(x, min(x, y), y /= y), x /= x)
        end function
        real(8) function fmin84(x, y) result(res)
            real(8), intent (in) :: x
            real(4), intent (in) :: y
            res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
        end function
        real(8) function fmin48(x, y) result(res)
            real(4), intent (in) :: x
            real(8), intent (in) :: y
            res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
        end function
    end module
    
    real(8) function code(x, y, z, t, a, b, c)
    use fmin_fmax_functions
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        real(8), intent (in) :: z
        real(8), intent (in) :: t
        real(8), intent (in) :: a
        real(8), intent (in) :: b
        real(8), intent (in) :: c
        code = b / (c * z)
    end function
    
    public static double code(double x, double y, double z, double t, double a, double b, double c) {
    	return b / (c * z);
    }
    
    def code(x, y, z, t, a, b, c):
    	return b / (c * z)
    
    function code(x, y, z, t, a, b, c)
    	return Float64(b / Float64(c * z))
    end
    
    function tmp = code(x, y, z, t, a, b, c)
    	tmp = b / (c * z);
    end
    
    code[x_, y_, z_, t_, a_, b_, c_] := N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]
    
    \frac{b}{c \cdot z}
    
    Derivation
    1. Initial program 79.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 \color{blue}{\frac{b}{c \cdot z}} \]
    3. Step-by-step derivation
      1. lower-/.f64N/A

        \[\leadsto \frac{b}{\color{blue}{c \cdot z}} \]
      2. lower-*.f6434.4%

        \[\leadsto \frac{b}{c \cdot \color{blue}{z}} \]
    4. Applied rewrites34.4%

      \[\leadsto \color{blue}{\frac{b}{c \cdot z}} \]
    5. Add Preprocessing

    Reproduce

    ?
    herbie shell --seed 2025204 
    (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)))