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

Percentage Accurate: 79.7% → 92.0%
Time: 5.5s
Alternatives: 17
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 17 alternatives:

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

Initial Program: 79.7% 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: 92.0% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -2.6 \cdot 10^{+67}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \mathsf{fma}\left(\frac{x}{z}, 9, \frac{b}{z \cdot y}\right) \cdot y\right)}{c}\\ \mathbf{elif}\;z \leq 5 \cdot 10^{-43}:\\ \;\;\;\;\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{z}\right)}{c}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= z -2.6e+67)
   (/ (fma (* a t) -4.0 (* (fma (/ x z) 9.0 (/ b (* z y))) y)) c)
   (if (<= z 5e-43)
     (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c))
     (/ (fma (* a t) -4.0 (/ (fma (* y x) 9.0 b) z)) c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (z <= -2.6e+67) {
		tmp = fma((a * t), -4.0, (fma((x / z), 9.0, (b / (z * y))) * y)) / c;
	} else if (z <= 5e-43) {
		tmp = ((((x * 9.0) * y) - (((z * 4.0) * t) * a)) + b) / (z * c);
	} else {
		tmp = fma((a * t), -4.0, (fma((y * x), 9.0, b) / z)) / c;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (z <= -2.6e+67)
		tmp = Float64(fma(Float64(a * t), -4.0, Float64(fma(Float64(x / z), 9.0, Float64(b / Float64(z * y))) * y)) / c);
	elseif (z <= 5e-43)
		tmp = Float64(Float64(Float64(Float64(Float64(x * 9.0) * y) - Float64(Float64(Float64(z * 4.0) * t) * a)) + b) / Float64(z * c));
	else
		tmp = Float64(fma(Float64(a * t), -4.0, Float64(fma(Float64(y * x), 9.0, b) / z)) / c);
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[z, -2.6e+67], N[(N[(N[(a * t), $MachinePrecision] * -4.0 + N[(N[(N[(x / z), $MachinePrecision] * 9.0 + N[(b / N[(z * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * y), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 5e-43], 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], N[(N[(N[(a * t), $MachinePrecision] * -4.0 + N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 56.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-*.f6478.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 rewrites78.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-*.f6487.2

        \[\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.2%

      \[\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 y around inf

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

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

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

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

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

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

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

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

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

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

    if -2.6e67 < z < 5.00000000000000019e-43

    1. Initial program 94.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} \]

    if 5.00000000000000019e-43 < z

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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.6%

      \[\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: 91.9% accurate, 0.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;c \leq 1.75 \cdot 10^{-63}:\\ \;\;\;\;\frac{\frac{\left(y \cdot x\right) \cdot 9 - \left(\left(\left(4 \cdot z\right) \cdot t\right) \cdot a - b\right)}{z}}{c}\\ \mathbf{elif}\;c \leq 2.5 \cdot 10^{+140}:\\ \;\;\;\;\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}:\\ \;\;\;\;\mathsf{fma}\left(-4, a \cdot \frac{t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right)\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= c 1.75e-63)
   (/ (/ (- (* (* y x) 9.0) (- (* (* (* 4.0 z) t) a) b)) z) c)
   (if (<= c 2.5e+140)
     (fma -4.0 (/ (* a t) c) (/ (fma (* 9.0 x) y b) (* c z)))
     (fma -4.0 (* a (/ t c)) (/ (fma (* y x) 9.0 b) (* c z))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (c <= 1.75e-63) {
		tmp = ((((y * x) * 9.0) - ((((4.0 * z) * t) * a) - b)) / z) / c;
	} else if (c <= 2.5e+140) {
		tmp = fma(-4.0, ((a * t) / c), (fma((9.0 * x), y, b) / (c * z)));
	} else {
		tmp = fma(-4.0, (a * (t / c)), (fma((y * x), 9.0, b) / (c * z)));
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (c <= 1.75e-63)
		tmp = Float64(Float64(Float64(Float64(Float64(y * x) * 9.0) - Float64(Float64(Float64(Float64(4.0 * z) * t) * a) - b)) / z) / c);
	elseif (c <= 2.5e+140)
		tmp = fma(-4.0, Float64(Float64(a * t) / c), Float64(fma(Float64(9.0 * x), y, b) / Float64(c * z)));
	else
		tmp = fma(-4.0, Float64(a * Float64(t / c)), Float64(fma(Float64(y * x), 9.0, b) / Float64(c * z)));
	end
	return tmp
end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[c, 1.75e-63], N[(N[(N[(N[(N[(y * x), $MachinePrecision] * 9.0), $MachinePrecision] - N[(N[(N[(N[(4.0 * z), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] / z), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[c, 2.5e+140], 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[(-4.0 * N[(a * N[(t / c), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(y * x), $MachinePrecision] * 9.0 + b), $MachinePrecision] / N[(c * z), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;c \leq 1.75 \cdot 10^{-63}:\\
\;\;\;\;\frac{\frac{\left(y \cdot x\right) \cdot 9 - \left(\left(\left(4 \cdot z\right) \cdot t\right) \cdot a - b\right)}{z}}{c}\\

\mathbf{elif}\;c \leq 2.5 \cdot 10^{+140}:\\
\;\;\;\;\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}:\\
\;\;\;\;\mathsf{fma}\left(-4, a \cdot \frac{t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right)\\


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if c < 1.75000000000000002e-63

    1. Initial program 83.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

    if 1.75000000000000002e-63 < c < 2.50000000000000004e140

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

        \[\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 rewrites89.0%

      \[\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 2.50000000000000004e140 < c

    1. Initial program 64.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-*.f6474.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 rewrites74.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. 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-/.f6479.7

        \[\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 rewrites79.7%

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

Alternative 3: 91.8% accurate, 0.8× speedup?

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

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

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

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if z < -1.18e-98 or 5.00000000000000019e-43 < z

    1. Initial program 69.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right)} \]
    5. Taylor expanded in 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}} \]

    if -1.18e-98 < z < 5.00000000000000019e-43

    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} \]
  3. Recombined 2 regimes into one program.
  4. Add Preprocessing

Alternative 4: 87.1% accurate, 0.8× speedup?

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

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

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

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


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

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

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

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

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

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

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

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

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

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

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

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

    if -8.19999999999999987e-71 < z < 5.00000000000000019e-43

    1. Initial program 96.4%

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

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

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

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

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

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

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

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

    if 5.00000000000000019e-43 < z

    1. Initial program 68.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        \[\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.6%

      \[\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.1% accurate, 0.5× speedup?

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

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

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


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

    1. Initial program 85.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-*.f6487.6

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

      \[\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-*.f6490.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 rewrites90.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}} \]
    8. Step-by-step derivation
      1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

    1. Initial program 71.5%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\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-/.f6480.6

        \[\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 rewrites80.6%

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

Alternative 6: 86.6% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \mathsf{fma}\left(y \cdot x, 9, b\right)\\ \mathbf{if}\;z \leq -5.5 \cdot 10^{-265}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot 9, x, b\right)}{z}\right)}{c}\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-94}:\\ \;\;\;\;\frac{t\_1}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{\mathsf{fma}\left(a \cdot t, -4, \frac{t\_1}{z}\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)))
   (if (<= z -5.5e-265)
     (/ (fma (* a t) -4.0 (/ (fma (* y 9.0) x b) z)) c)
     (if (<= z 3.8e-94) (/ t_1 (* z c)) (/ (fma (* a t) -4.0 (/ t_1 z)) 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 tmp;
	if (z <= -5.5e-265) {
		tmp = fma((a * t), -4.0, (fma((y * 9.0), x, b) / z)) / c;
	} else if (z <= 3.8e-94) {
		tmp = t_1 / (z * c);
	} else {
		tmp = fma((a * t), -4.0, (t_1 / z)) / c;
	}
	return tmp;
}
function code(x, y, z, t, a, b, c)
	t_1 = fma(Float64(y * x), 9.0, b)
	tmp = 0.0
	if (z <= -5.5e-265)
		tmp = Float64(fma(Float64(a * t), -4.0, Float64(fma(Float64(y * 9.0), x, b) / z)) / c);
	elseif (z <= 3.8e-94)
		tmp = Float64(t_1 / Float64(z * c));
	else
		tmp = Float64(fma(Float64(a * t), -4.0, Float64(t_1 / z)) / 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]}, If[LessEqual[z, -5.5e-265], N[(N[(N[(a * t), $MachinePrecision] * -4.0 + N[(N[(N[(y * 9.0), $MachinePrecision] * x + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 3.8e-94], N[(t$95$1 / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(N[(a * t), $MachinePrecision] * -4.0 + N[(t$95$1 / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]]]]
\begin{array}{l}

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

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

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


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

    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-*.f6483.7

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right)} \]
    5. Taylor expanded in 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-*.f6486.8

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

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

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

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

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

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

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

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

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

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

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

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

    if -5.49999999999999985e-265 < z < 3.79999999999999999e-94

    1. Initial program 96.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in z around 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 3.79999999999999999e-94 < 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.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 rewrites83.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-*.f6488.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 rewrites88.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 7: 83.3% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{\mathsf{fma}\left(a \cdot t, -4, \frac{\mathsf{fma}\left(y \cdot 9, x, b\right)}{z}\right)}{c}\\ \mathbf{if}\;z \leq -5.5 \cdot 10^{-265}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 3.8 \cdot 10^{-94}:\\ \;\;\;\;\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 (/ (fma (* y 9.0) x b) z)) c)))
   (if (<= z -5.5e-265)
     t_1
     (if (<= z 3.8e-94) (/ (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, (fma((y * 9.0), x, b) / z)) / c;
	double tmp;
	if (z <= -5.5e-265) {
		tmp = t_1;
	} else if (z <= 3.8e-94) {
		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(fma(Float64(y * 9.0), x, b) / z)) / c)
	tmp = 0.0
	if (z <= -5.5e-265)
		tmp = t_1;
	elseif (z <= 3.8e-94)
		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[(N[(N[(y * 9.0), $MachinePrecision] * x + b), $MachinePrecision] / z), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision]}, If[LessEqual[z, -5.5e-265], t$95$1, If[LessEqual[z, 3.8e-94], 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{\mathsf{fma}\left(y \cdot 9, x, b\right)}{z}\right)}{c}\\
\mathbf{if}\;z \leq -5.5 \cdot 10^{-265}:\\
\;\;\;\;t\_1\\

\mathbf{elif}\;z \leq 3.8 \cdot 10^{-94}:\\
\;\;\;\;\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 < -5.49999999999999985e-265 or 3.79999999999999999e-94 < z

    1. Initial program 75.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-*.f6483.4

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right)} \]
    5. Taylor expanded in 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.6

        \[\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.6%

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

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

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

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

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

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

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

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

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

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

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

    if -5.49999999999999985e-265 < z < 3.79999999999999999e-94

    1. Initial program 96.9%

      \[\frac{\left(\left(x \cdot 9\right) \cdot y - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b}{z \cdot c} \]
    2. Taylor expanded in z around 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 8: 75.4% accurate, 1.1× speedup?

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

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

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

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


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

    1. Initial program 64.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right)} \]
    5. Taylor expanded in 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.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 rewrites88.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-*.f6468.5

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

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

    if -1.7999999999999999e-23 < z < 4.69999999999999986e-4

    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 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-*.f6480.3

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

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

    if 4.69999999999999986e-4 < z

    1. Initial program 65.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-*.f6482.6

        \[\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.6%

      \[\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.2

        \[\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.2%

      \[\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.5%

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

    Alternative 9: 74.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 -6.8 \cdot 10^{-53}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 0.00047:\\ \;\;\;\;\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 -6.8e-53)
         t_1
         (if (<= z 0.00047) (/ (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 <= -6.8e-53) {
    		tmp = t_1;
    	} else if (z <= 0.00047) {
    		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 <= -6.8e-53)
    		tmp = t_1;
    	elseif (z <= 0.00047)
    		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, -6.8e-53], t$95$1, If[LessEqual[z, 0.00047], 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 -6.8 \cdot 10^{-53}:\\
    \;\;\;\;t\_1\\
    
    \mathbf{elif}\;z \leq 0.00047:\\
    \;\;\;\;\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 < -6.8e-53 or 4.69999999999999986e-4 < z

      1. Initial program 66.1%

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

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

        if -6.8e-53 < z < 4.69999999999999986e-4

        1. Initial program 95.9%

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

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

          \[\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: 68.7% accurate, 1.2× speedup?

      \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -4.1 \cdot 10^{+68}:\\ \;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c}\\ \mathbf{elif}\;z \leq 3.6 \cdot 10^{+134}:\\ \;\;\;\;\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 -4.1e+68)
         (/ (* (* a t) -4.0) c)
         (if (<= z 3.6e+134)
           (/ (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 <= -4.1e+68) {
      		tmp = ((a * t) * -4.0) / c;
      	} else if (z <= 3.6e+134) {
      		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 <= -4.1e+68)
      		tmp = Float64(Float64(Float64(a * t) * -4.0) / c);
      	elseif (z <= 3.6e+134)
      		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, -4.1e+68], N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 3.6e+134], 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 -4.1 \cdot 10^{+68}:\\
      \;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c}\\
      
      \mathbf{elif}\;z \leq 3.6 \cdot 10^{+134}:\\
      \;\;\;\;\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 < -4.0999999999999999e68

        1. Initial program 56.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 b around inf

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

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

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

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

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

              \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
            5. lower-/.f6424.2

              \[\leadsto \frac{\color{blue}{\frac{b}{z}}}{c} \]
            6. associate-+l-24.2

              \[\leadsto \frac{\frac{b}{z}}{c} \]
            7. associate-*l*24.2

              \[\leadsto \frac{\frac{b}{z}}{c} \]
            8. *-commutative24.2

              \[\leadsto \frac{\frac{b}{z}}{c} \]
            9. *-commutative24.2

              \[\leadsto \frac{\frac{b}{z}}{c} \]
            10. associate-+l-24.2

              \[\leadsto \frac{\frac{b}{z}}{c} \]
          3. Applied rewrites24.2%

            \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
          4. Taylor expanded in z around inf

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

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

              \[\leadsto \frac{\left(a \cdot t\right) \cdot \color{blue}{-4}}{c} \]
            3. lift-*.f6456.6

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

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

          if -4.0999999999999999e68 < z < 3.59999999999999988e134

          1. Initial program 92.1%

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

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

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

          if 3.59999999999999988e134 < z

          1. Initial program 51.9%

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

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

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

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

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

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

        Alternative 11: 50.6% accurate, 0.6× speedup?

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

          1. Initial program 78.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-*.f6480.6

              \[\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.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\frac{\left(y \cdot x\right) \cdot 9}{c}}{z} \]
            6. lift-*.f6454.8

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

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

          if -4.0000000000000003e-15 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999992e-72

          1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
            16. lower-*.f6488.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 rewrites88.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 z around 0

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\frac{b}{c}}{z} \]
          9. Step-by-step derivation
            1. lift-/.f6448.7

              \[\leadsto \frac{\frac{b}{c}}{z} \]
          10. Applied rewrites48.7%

            \[\leadsto \frac{\frac{b}{c}}{z} \]

          if 9.9999999999999992e-72 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999994e224

          1. Initial program 83.5%

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

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

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

          if 1.99999999999999994e224 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

          1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 12: 50.6% accurate, 0.6× speedup?

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

          1. Initial program 78.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-*.f6480.6

              \[\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.6%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \frac{\frac{\left(y \cdot x\right) \cdot 9}{c}}{z} \]
            6. lift-*.f6454.8

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

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

          if -4.0000000000000003e-15 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999992e-72

          1. Initial program 82.0%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
            16. lower-*.f6488.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 rewrites88.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 z around 0

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\frac{b}{c}}{z} \]
          9. Step-by-step derivation
            1. lift-/.f6448.7

              \[\leadsto \frac{\frac{b}{c}}{z} \]
          10. Applied rewrites48.7%

            \[\leadsto \frac{\frac{b}{c}}{z} \]

          if 9.9999999999999992e-72 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999994e224

          1. Initial program 83.5%

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

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

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

          if 1.99999999999999994e224 < (*.f64 (*.f64 x #s(literal 9 binary64)) y)

          1. Initial program 67.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
            16. lower-*.f6466.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 rewrites66.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-*.f6471.2

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

        Alternative 13: 50.6% accurate, 0.6× speedup?

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

          1. Initial program 72.4%

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

              \[\leadsto \mathsf{fma}\left(-4, \frac{a \cdot t}{c}, \frac{\mathsf{fma}\left(y \cdot x, 9, b\right)}{c \cdot z}\right) \]
            16. lower-*.f6472.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 rewrites72.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-*.f6476.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 rewrites76.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. Step-by-step derivation
            1. lift-*.f64N/A

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

          if -9.9999999999999994e104 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 9.9999999999999992e-72

          1. Initial program 82.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-*.f6488.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 rewrites88.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 z around 0

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

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

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

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

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

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

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

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

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

            \[\leadsto \frac{\frac{b}{c}}{z} \]
          9. Step-by-step derivation
            1. lift-/.f6446.1

              \[\leadsto \frac{\frac{b}{c}}{z} \]
          10. Applied rewrites46.1%

            \[\leadsto \frac{\frac{b}{c}}{z} \]

          if 9.9999999999999992e-72 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999994e224

          1. Initial program 83.5%

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

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

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

        Alternative 14: 49.8% accurate, 1.5× speedup?

        \[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;z \leq -1.8 \cdot 10^{-23}:\\ \;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c}\\ \mathbf{elif}\;z \leq 0.00017:\\ \;\;\;\;\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 -1.8e-23)
           (/ (* (* a t) -4.0) c)
           (if (<= z 0.00017) (/ 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 <= -1.8e-23) {
        		tmp = ((a * t) * -4.0) / c;
        	} else if (z <= 0.00017) {
        		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 <= (-1.8d-23)) then
                tmp = ((a * t) * (-4.0d0)) / c
            else if (z <= 0.00017d0) 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 <= -1.8e-23) {
        		tmp = ((a * t) * -4.0) / c;
        	} else if (z <= 0.00017) {
        		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 <= -1.8e-23:
        		tmp = ((a * t) * -4.0) / c
        	elif z <= 0.00017:
        		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 <= -1.8e-23)
        		tmp = Float64(Float64(Float64(a * t) * -4.0) / c);
        	elseif (z <= 0.00017)
        		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 <= -1.8e-23)
        		tmp = ((a * t) * -4.0) / c;
        	elseif (z <= 0.00017)
        		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, -1.8e-23], N[(N[(N[(a * t), $MachinePrecision] * -4.0), $MachinePrecision] / c), $MachinePrecision], If[LessEqual[z, 0.00017], 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 -1.8 \cdot 10^{-23}:\\
        \;\;\;\;\frac{\left(a \cdot t\right) \cdot -4}{c}\\
        
        \mathbf{elif}\;z \leq 0.00017:\\
        \;\;\;\;\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 < -1.7999999999999999e-23

          1. Initial program 64.4%

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

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

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

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

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

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

                \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
              5. lower-/.f6427.1

                \[\leadsto \frac{\color{blue}{\frac{b}{z}}}{c} \]
              6. associate-+l-27.1

                \[\leadsto \frac{\frac{b}{z}}{c} \]
              7. associate-*l*27.1

                \[\leadsto \frac{\frac{b}{z}}{c} \]
              8. *-commutative27.1

                \[\leadsto \frac{\frac{b}{z}}{c} \]
              9. *-commutative27.1

                \[\leadsto \frac{\frac{b}{z}}{c} \]
              10. associate-+l-27.1

                \[\leadsto \frac{\frac{b}{z}}{c} \]
            3. Applied rewrites27.1%

              \[\leadsto \color{blue}{\frac{\frac{b}{z}}{c}} \]
            4. Taylor expanded in z around inf

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

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

                \[\leadsto \frac{\left(a \cdot t\right) \cdot \color{blue}{-4}}{c} \]
              3. lift-*.f6451.4

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

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

            if -1.7999999999999999e-23 < z < 1.7e-4

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

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

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

              if 1.7e-4 < z

              1. Initial program 65.6%

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

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

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

            Alternative 15: 49.8% 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^{-23}:\\ \;\;\;\;t\_1\\ \mathbf{elif}\;z \leq 0.00017:\\ \;\;\;\;\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-23) t_1 (if (<= z 0.00017) (/ 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-23) {
            		tmp = t_1;
            	} else if (z <= 0.00017) {
            		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-23)) then
                    tmp = t_1
                else if (z <= 0.00017d0) 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-23) {
            		tmp = t_1;
            	} else if (z <= 0.00017) {
            		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-23:
            		tmp = t_1
            	elif z <= 0.00017:
            		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-23)
            		tmp = t_1;
            	elseif (z <= 0.00017)
            		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-23)
            		tmp = t_1;
            	elseif (z <= 0.00017)
            		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-23], t$95$1, If[LessEqual[z, 0.00017], 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^{-23}:\\
            \;\;\;\;t\_1\\
            
            \mathbf{elif}\;z \leq 0.00017:\\
            \;\;\;\;\frac{b}{z \cdot c}\\
            
            \mathbf{else}:\\
            \;\;\;\;t\_1\\
            
            
            \end{array}
            \end{array}
            
            Derivation
            1. Split input into 2 regimes
            2. if z < -1.7999999999999999e-23 or 1.7e-4 < z

              1. Initial program 65.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 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.8

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

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

              if -1.7999999999999999e-23 < z < 1.7e-4

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

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

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

              Alternative 16: 35.4% accurate, 3.6× speedup?

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

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

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

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

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

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

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

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

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

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

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

                \[\leadsto \frac{\frac{b}{c}}{z} \]
              9. Step-by-step derivation
                1. lift-/.f6435.1

                  \[\leadsto \frac{\frac{b}{c}}{z} \]
              10. Applied rewrites35.1%

                \[\leadsto \frac{\frac{b}{c}}{z} \]
              11. Add Preprocessing

              Alternative 17: 35.1% 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.7%

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

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

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

                Reproduce

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