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

Percentage Accurate: 79.8% → 88.5%
Time: 4.8s
Alternatives: 13
Speedup: 0.9×

Specification

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

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

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

\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}

Local Percentage Accuracy vs ?

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

Accuracy vs Speed?

Herbie found 13 alternatives:

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

Initial Program: 79.8% accurate, 1.0× speedup?

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

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

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

\\
\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}
\end{array}

Alternative 1: 88.5% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y \cdot x, 9, b\right)\\
t_2 := \frac{t\_1}{z}\\
\mathbf{if}\;z \leq -3.5 \cdot 10^{-8}:\\
\;\;\;\;-\frac{\mathsf{fma}\left(4 \cdot a, t, -t\_2\right)}{c}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -3.50000000000000024e-8

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -3.50000000000000024e-8 < z < 1.8e-119

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8e-119 < z

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 2: 88.4% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\\
\mathbf{if}\;z \leq -5 \cdot 10^{-8}:\\
\;\;\;\;-\frac{\mathsf{fma}\left(4 \cdot a, t, -t\_1\right)}{c}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -4.9999999999999998e-8

    1. Initial program 65.9%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -4.9999999999999998e-8 < z < 1.8e-119

    1. Initial program 95.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.8e-119 < z

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 3: 88.0% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y \cdot x, 9, b\right)\\
\mathbf{if}\;c \leq 4 \cdot 10^{-57}:\\
\;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{t\_1}{z}\right)}{c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if c < 3.99999999999999982e-57

    1. Initial program 83.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 3.99999999999999982e-57 < c

    1. Initial program 71.2%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 4: 88.0% accurate, 0.8× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y \cdot x, 9, b\right)\\
t_2 := \frac{t\_1}{z}\\
\mathbf{if}\;z \leq -1.15 \cdot 10^{-48}:\\
\;\;\;\;-\frac{\mathsf{fma}\left(4 \cdot a, t, -t\_2\right)}{c}\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.15e-48

    1. Initial program 68.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.15e-48 < z < 4.40000000000000025e-120

    1. Initial program 95.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 4.40000000000000025e-120 < z

    1. Initial program 72.7%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 5: 87.7% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y \cdot x, 9, b\right)\\
t_2 := \frac{t\_1}{z}\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{-85}:\\
\;\;\;\;-\frac{\mathsf{fma}\left(4 \cdot a, t, -t\_2\right)}{c}\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-242}:\\
\;\;\;\;\frac{t\_1}{z \cdot c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if z < -1.22000000000000006e-85

    1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.22000000000000006e-85 < z < 4.20000000000000037e-242

    1. Initial program 96.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. +-commutativeN/A

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

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

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

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

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

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

    if 4.20000000000000037e-242 < z

    1. Initial program 77.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Alternative 6: 87.6% accurate, 0.9× speedup?

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

\\
\begin{array}{l}
t_1 := \mathsf{fma}\left(y \cdot x, 9, b\right)\\
t_2 := \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{t\_1}{z}\right)}{c}\\
\mathbf{if}\;z \leq -1.22 \cdot 10^{-85}:\\
\;\;\;\;t\_2\\

\mathbf{elif}\;z \leq 4.2 \cdot 10^{-242}:\\
\;\;\;\;\frac{t\_1}{z \cdot c}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.22000000000000006e-85 or 4.20000000000000037e-242 < z

    1. Initial program 74.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    if -1.22000000000000006e-85 < z < 4.20000000000000037e-242

    1. Initial program 96.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. +-commutativeN/A

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

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

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

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

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

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

Alternative 7: 74.8% accurate, 0.7× speedup?

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

\\
\begin{array}{l}
t_1 := \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z}\right)}{c}\\
\mathbf{if}\;z \leq -1.75 \cdot 10^{-85}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 7.2 \cdot 10^{-118}:\\
\;\;\;\;\frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z \cdot c}\\

\mathbf{elif}\;z \leq 2.4 \cdot 10^{+112}:\\
\;\;\;\;t\_1\\

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 4 regimes
  2. if z < -1.74999999999999989e-85 or 7.2000000000000004e-118 < z < 2.4e112

    1. Initial program 77.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 \color{blue}{\left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c}} \]
    3. Step-by-step derivation
      1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if -1.74999999999999989e-85 < z < 7.2000000000000004e-118

      1. Initial program 96.0%

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

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

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

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

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

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

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

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

      if 2.4e112 < z < 6.8000000000000001e199

      1. Initial program 77.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 \color{blue}{\left(9 \cdot \frac{x \cdot y}{c \cdot z} + \frac{b}{c \cdot z}\right) - 4 \cdot \frac{a \cdot t}{c}} \]
      3. Step-by-step derivation
        1. fp-cancel-sub-sign-invN/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      if 6.8000000000000001e199 < z

      1. Initial program 64.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      Alternative 8: 74.8% accurate, 1.1× speedup?

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

        1. Initial program 71.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -1.74999999999999989e-85 < z < 7.2000000000000004e-118

          1. Initial program 96.0%

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

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

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

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

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

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

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

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

          if 7.2000000000000004e-118 < z

          1. Initial program 72.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          Alternative 9: 73.9% accurate, 1.2× speedup?

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

            1. Initial program 71.8%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{b}{z}\right)}{c} \]
            9. Step-by-step derivation
              1. Applied rewrites70.2%

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

              if -1.74999999999999989e-85 < z < 7.2000000000000004e-118

              1. Initial program 96.0%

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

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

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

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

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

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

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

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

            Alternative 10: 69.1% accurate, 1.2× speedup?

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

              1. Initial program 56.4%

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

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

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

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

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

                \[\leadsto \left(-4 \cdot \frac{a}{c}\right) \cdot t \]
              6. Step-by-step derivation
                1. *-commutativeN/A

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

                  \[\leadsto \left(\frac{a}{c} \cdot -4\right) \cdot t \]
                3. lift-/.f6461.6

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

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

              if -2.2e115 < z < 1.07999999999999994e105

              1. Initial program 91.5%

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

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

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

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

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

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

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

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

              if 1.07999999999999994e105 < z

              1. Initial program 55.2%

                \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
              2. 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-*.f6459.9

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

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

            Alternative 11: 49.3% accurate, 1.5× speedup?

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

              1. Initial program 58.9%

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

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

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

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

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

                \[\leadsto \left(-4 \cdot \frac{a}{c}\right) \cdot t \]
              6. Step-by-step derivation
                1. *-commutativeN/A

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

                  \[\leadsto \left(\frac{a}{c} \cdot -4\right) \cdot t \]
                3. lift-/.f6460.0

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

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

              if -2.89999999999999997e85 < z < 4.20000000000000004e-110

              1. Initial program 93.6%

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

                \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
              3. Step-by-step derivation
                1. Applied rewrites46.4%

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

                if 4.20000000000000004e-110 < z

                1. Initial program 72.2%

                  \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
                2. 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-*.f6447.3

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

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

              Alternative 12: 49.2% accurate, 1.5× speedup?

              \[\begin{array}{l} \\ \begin{array}{l} t_1 := -4 \cdot \frac{a \cdot t}{c}\\ \mathbf{if}\;z \leq -1.8 \cdot 10^{+82}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 4.2 \cdot 10^{-110}:\\ \;\;\;\;\frac{b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;t\_1\\ \end{array} \end{array} \]
              (FPCore (x y z t a b c)
               :precision binary64
               (let* ((t_1 (* -4.0 (/ (* a t) c))))
                 (if (<= z -1.8e+82) t_1 (if (<= z 4.2e-110) (/ b (* z c)) t_1))))
              double code(double x, double y, double z, double t, double a, double b, double c) {
              	double t_1 = -4.0 * ((a * t) / c);
              	double tmp;
              	if (z <= -1.8e+82) {
              		tmp = t_1;
              	} else if (z <= 4.2e-110) {
              		tmp = b / (z * c);
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              module fmin_fmax_functions
                  implicit none
                  private
                  public fmax
                  public fmin
              
                  interface fmax
                      module procedure fmax88
                      module procedure fmax44
                      module procedure fmax84
                      module procedure fmax48
                  end interface
                  interface fmin
                      module procedure fmin88
                      module procedure fmin44
                      module procedure fmin84
                      module procedure fmin48
                  end interface
              contains
                  real(8) function fmax88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmax44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, max(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmax84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmax48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
                  end function
                  real(8) function fmin88(x, y) result (res)
                      real(8), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(4) function fmin44(x, y) result (res)
                      real(4), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(y, merge(x, min(x, y), y /= y), x /= x)
                  end function
                  real(8) function fmin84(x, y) result(res)
                      real(8), intent (in) :: x
                      real(4), intent (in) :: y
                      res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
                  end function
                  real(8) function fmin48(x, y) result(res)
                      real(4), intent (in) :: x
                      real(8), intent (in) :: y
                      res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
                  end function
              end module
              
              real(8) function code(x, y, z, t, a, b, c)
              use fmin_fmax_functions
                  real(8), intent (in) :: x
                  real(8), intent (in) :: y
                  real(8), intent (in) :: z
                  real(8), intent (in) :: t
                  real(8), intent (in) :: a
                  real(8), intent (in) :: b
                  real(8), intent (in) :: c
                  real(8) :: t_1
                  real(8) :: tmp
                  t_1 = (-4.0d0) * ((a * t) / c)
                  if (z <= (-1.8d+82)) then
                      tmp = t_1
                  else if (z <= 4.2d-110) then
                      tmp = b / (z * c)
                  else
                      tmp = t_1
                  end if
                  code = tmp
              end function
              
              public static double code(double x, double y, double z, double t, double a, double b, double c) {
              	double t_1 = -4.0 * ((a * t) / c);
              	double tmp;
              	if (z <= -1.8e+82) {
              		tmp = t_1;
              	} else if (z <= 4.2e-110) {
              		tmp = b / (z * c);
              	} else {
              		tmp = t_1;
              	}
              	return tmp;
              }
              
              def code(x, y, z, t, a, b, c):
              	t_1 = -4.0 * ((a * t) / c)
              	tmp = 0
              	if z <= -1.8e+82:
              		tmp = t_1
              	elif z <= 4.2e-110:
              		tmp = b / (z * c)
              	else:
              		tmp = t_1
              	return tmp
              
              function code(x, y, z, t, a, b, c)
              	t_1 = Float64(-4.0 * Float64(Float64(a * t) / c))
              	tmp = 0.0
              	if (z <= -1.8e+82)
              		tmp = t_1;
              	elseif (z <= 4.2e-110)
              		tmp = Float64(b / Float64(z * c));
              	else
              		tmp = t_1;
              	end
              	return tmp
              end
              
              function tmp_2 = code(x, y, z, t, a, b, c)
              	t_1 = -4.0 * ((a * t) / c);
              	tmp = 0.0;
              	if (z <= -1.8e+82)
              		tmp = t_1;
              	elseif (z <= 4.2e-110)
              		tmp = b / (z * c);
              	else
              		tmp = t_1;
              	end
              	tmp_2 = tmp;
              end
              
              code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(-4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[z, -1.8e+82], t$95$1, If[LessEqual[z, 4.2e-110], N[(b / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$1]]]
              
              \begin{array}{l}
              
              \\
              \begin{array}{l}
              t_1 := -4 \cdot \frac{a \cdot t}{c}\\
              \mathbf{if}\;z \leq -1.8 \cdot 10^{+82}:\\
              \;\;\;\;t\_1\\
              
              \mathbf{elif}\;z \leq 4.2 \cdot 10^{-110}:\\
              \;\;\;\;\frac{b}{z \cdot c}\\
              
              \mathbf{else}:\\
              \;\;\;\;t\_1\\
              
              
              \end{array}
              \end{array}
              
              Derivation
              1. Split input into 2 regimes
              2. if z < -1.80000000000000007e82 or 4.20000000000000004e-110 < z

                1. Initial program 67.5%

                  \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
                2. Taylor expanded in 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-*.f6451.7

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

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

                if -1.80000000000000007e82 < z < 4.20000000000000004e-110

                1. Initial program 93.8%

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

                  \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
                3. Step-by-step derivation
                  1. Applied rewrites46.5%

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

                Alternative 13: 35.4% accurate, 3.8× speedup?

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

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

                  \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
                3. Step-by-step derivation
                  1. Applied rewrites35.4%

                    \[\leadsto \frac{\color{blue}{b}}{z \cdot c} \]
                  2. Add Preprocessing

                  Reproduce

                  ?
                  herbie shell --seed 2025115 
                  (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)))