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

Percentage Accurate: 79.6% → 79.6%
Time: 2.7s
Alternatives: 11
Speedup: 1.0×

Specification

?
\[\mathsf{TRUE}\left(\right)\]
\[\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);
}
real(8) function code(x, y, z, t, a, b, c)
    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}

Sampling outcomes in binary64 precision:

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 11 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.6% 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);
}
real(8) function code(x, y, z, t, a, b, c)
    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: 79.6% 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);
}
real(8) function code(x, y, z, t, a, b, c)
    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}
Derivation
  1. Initial program 74.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. Add Preprocessing
  3. Add Preprocessing

Alternative 2: 49.2% accurate, 0.5× speedup?

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

\\
\begin{array}{l}
t_1 := \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\\
t_2 := \left(x \cdot 9\right) \cdot y\\
t_3 := \frac{t\_2}{z \cdot c}\\
\mathbf{if}\;t\_2 \leq -2 \cdot 10^{+40}:\\
\;\;\;\;t\_3\\

\mathbf{elif}\;t\_2 \leq 5 \cdot 10^{-205}:\\
\;\;\;\;\frac{t\_1 + b}{z \cdot c}\\

\mathbf{elif}\;t\_2 \leq 2 \cdot 10^{-10}:\\
\;\;\;\;\frac{x \cdot 9 - t\_1}{z \cdot c}\\

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


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

    1. Initial program 75.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

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

    if -2.00000000000000006e40 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 5.00000000000000001e-205

    1. Initial program 73.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

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

    if 5.00000000000000001e-205 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 2.00000000000000007e-10

    1. Initial program 72.6%

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

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

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

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

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

Alternative 3: 49.9% accurate, 0.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(x \cdot 9\right) \cdot y\\ t_2 := \frac{t\_1}{z \cdot c}\\ \mathbf{if}\;t\_1 \leq -2 \cdot 10^{+40}:\\ \;\;\;\;t\_2\\ \mathbf{elif}\;t\_1 \leq 2 \cdot 10^{-73}:\\ \;\;\;\;\frac{\left(\left(z \cdot 4\right) \cdot t\right) \cdot a + b}{z \cdot 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 (/ t_1 (* z c))))
   (if (<= t_1 -2e+40)
     t_2
     (if (<= t_1 2e-73) (/ (+ (* (* (* z 4.0) t) a) b) (* z c)) t_2))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (x * 9.0) * y;
	double t_2 = t_1 / (z * c);
	double tmp;
	if (t_1 <= -2e+40) {
		tmp = t_2;
	} else if (t_1 <= 2e-73) {
		tmp = ((((z * 4.0) * t) * a) + b) / (z * c);
	} else {
		tmp = t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    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 = t_1 / (z * c)
    if (t_1 <= (-2d+40)) then
        tmp = t_2
    else if (t_1 <= 2d-73) then
        tmp = ((((z * 4.0d0) * t) * a) + b) / (z * c)
    else
        tmp = t_2
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = (x * 9.0) * y;
	double t_2 = t_1 / (z * c);
	double tmp;
	if (t_1 <= -2e+40) {
		tmp = t_2;
	} else if (t_1 <= 2e-73) {
		tmp = ((((z * 4.0) * t) * a) + b) / (z * c);
	} else {
		tmp = t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = (x * 9.0) * y
	t_2 = t_1 / (z * c)
	tmp = 0
	if t_1 <= -2e+40:
		tmp = t_2
	elif t_1 <= 2e-73:
		tmp = ((((z * 4.0) * t) * a) + b) / (z * c)
	else:
		tmp = t_2
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(x * 9.0) * y)
	t_2 = Float64(t_1 / Float64(z * c))
	tmp = 0.0
	if (t_1 <= -2e+40)
		tmp = t_2;
	elseif (t_1 <= 2e-73)
		tmp = Float64(Float64(Float64(Float64(Float64(z * 4.0) * t) * a) + b) / Float64(z * c));
	else
		tmp = t_2;
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = (x * 9.0) * y;
	t_2 = t_1 / (z * c);
	tmp = 0.0;
	if (t_1 <= -2e+40)
		tmp = t_2;
	elseif (t_1 <= 2e-73)
		tmp = ((((z * 4.0) * t) * a) + b) / (z * c);
	else
		tmp = t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$2 = N[(t$95$1 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$1, -2e+40], t$95$2, If[LessEqual[t$95$1, 2e-73], N[(N[(N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], t$95$2]]]]
\begin{array}{l}

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

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

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


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

    1. Initial program 76.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

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

    if -2.00000000000000006e40 < (*.f64 (*.f64 x #s(literal 9 binary64)) y) < 1.99999999999999999e-73

    1. Initial program 72.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

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

Alternative 4: 59.0% accurate, 0.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\\ \mathbf{if}\;b \leq 1.1 \cdot 10^{+216}:\\ \;\;\;\;\frac{\left(x \cdot 9\right) \cdot y - t\_1}{z \cdot c}\\ \mathbf{else}:\\ \;\;\;\;\frac{t\_1 + b}{z \cdot c}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (* (* (* z 4.0) t) a)))
   (if (<= b 1.1e+216)
     (/ (- (* (* x 9.0) y) t_1) (* z c))
     (/ (+ t_1 b) (* z c)))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = ((z * 4.0) * t) * a;
	double tmp;
	if (b <= 1.1e+216) {
		tmp = (((x * 9.0) * y) - t_1) / (z * c);
	} else {
		tmp = (t_1 + b) / (z * c);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    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 = ((z * 4.0d0) * t) * a
    if (b <= 1.1d+216) then
        tmp = (((x * 9.0d0) * y) - t_1) / (z * c)
    else
        tmp = (t_1 + b) / (z * c)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = ((z * 4.0) * t) * a;
	double tmp;
	if (b <= 1.1e+216) {
		tmp = (((x * 9.0) * y) - t_1) / (z * c);
	} else {
		tmp = (t_1 + b) / (z * c);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = ((z * 4.0) * t) * a
	tmp = 0
	if b <= 1.1e+216:
		tmp = (((x * 9.0) * y) - t_1) / (z * c)
	else:
		tmp = (t_1 + b) / (z * c)
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(Float64(Float64(z * 4.0) * t) * a)
	tmp = 0.0
	if (b <= 1.1e+216)
		tmp = Float64(Float64(Float64(Float64(x * 9.0) * y) - t_1) / Float64(z * c));
	else
		tmp = Float64(Float64(t_1 + b) / Float64(z * c));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = ((z * 4.0) * t) * a;
	tmp = 0.0;
	if (b <= 1.1e+216)
		tmp = (((x * 9.0) * y) - t_1) / (z * c);
	else
		tmp = (t_1 + b) / (z * c);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]}, If[LessEqual[b, 1.1e+216], N[(N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] - t$95$1), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision], N[(N[(t$95$1 + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]]
\begin{array}{l}

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

\mathbf{else}:\\
\;\;\;\;\frac{t\_1 + b}{z \cdot c}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < 1.1e216

    1. Initial program 74.8%

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

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

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

    if 1.1e216 < b

    1. Initial program 70.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

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

Alternative 5: 15.4% accurate, 1.7× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;y \leq -8 \cdot 10^{-303}:\\ \;\;\;\;\left(\left(x \cdot 9\right) \cdot y\right) \cdot y\\ \mathbf{else}:\\ \;\;\;\;\frac{x \cdot 9}{z \cdot c}\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (if (<= y -8e-303) (* (* (* x 9.0) y) y) (/ (* x 9.0) (* z c))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (y <= -8e-303) {
		tmp = ((x * 9.0) * y) * y;
	} else {
		tmp = (x * 9.0) / (z * c);
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    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 (y <= (-8d-303)) then
        tmp = ((x * 9.0d0) * y) * y
    else
        tmp = (x * 9.0d0) / (z * c)
    end if
    code = tmp
end function
public static double code(double x, double y, double z, double t, double a, double b, double c) {
	double tmp;
	if (y <= -8e-303) {
		tmp = ((x * 9.0) * y) * y;
	} else {
		tmp = (x * 9.0) / (z * c);
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	tmp = 0
	if y <= -8e-303:
		tmp = ((x * 9.0) * y) * y
	else:
		tmp = (x * 9.0) / (z * c)
	return tmp
function code(x, y, z, t, a, b, c)
	tmp = 0.0
	if (y <= -8e-303)
		tmp = Float64(Float64(Float64(x * 9.0) * y) * y);
	else
		tmp = Float64(Float64(x * 9.0) / Float64(z * c));
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	tmp = 0.0;
	if (y <= -8e-303)
		tmp = ((x * 9.0) * y) * y;
	else
		tmp = (x * 9.0) / (z * c);
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := If[LessEqual[y, -8e-303], N[(N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision] * y), $MachinePrecision], N[(N[(x * 9.0), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;y \leq -8 \cdot 10^{-303}:\\
\;\;\;\;\left(\left(x \cdot 9\right) \cdot y\right) \cdot y\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if y < -7.99999999999999944e-303

    1. Initial program 75.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. Add Preprocessing
    3. 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}} \]
    4. Applied rewrites8.9%

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

      \[\leadsto \left(b + 9 \cdot \left(x \cdot y\right)\right) - \color{blue}{4 \cdot \left(a \cdot \left(t \cdot z\right)\right)} \]
    6. Applied rewrites5.5%

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

      \[\leadsto \left(9 \cdot x\right) \cdot y \]
    8. Applied rewrites11.8%

      \[\leadsto \left(\left(x \cdot 9\right) \cdot y\right) \cdot y \]

    if -7.99999999999999944e-303 < y

    1. Initial program 73.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. Add Preprocessing
    3. Taylor expanded in x around 0

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

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

      \[\leadsto \frac{9 \cdot \color{blue}{\left(x \cdot y\right)}}{z \cdot c} \]
    6. Applied rewrites19.7%

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

Alternative 6: 36.6% accurate, 1.8× speedup?

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

\\
\frac{\left(x \cdot 9\right) \cdot y}{z \cdot c}
\end{array}
Derivation
  1. Initial program 74.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. Add Preprocessing
  3. Taylor expanded in x around 0

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

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

Alternative 7: 11.3% accurate, 3.0× speedup?

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

\\
\left(\left(x \cdot 9\right) \cdot y\right) \cdot y
\end{array}
Derivation
  1. Initial program 74.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. Add Preprocessing
  3. 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}} \]
  4. Applied rewrites9.3%

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

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

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

    \[\leadsto \left(9 \cdot x\right) \cdot y \]
  8. Applied rewrites10.0%

    \[\leadsto \left(\left(x \cdot 9\right) \cdot y\right) \cdot y \]
  9. Add Preprocessing

Alternative 8: 7.3% accurate, 3.4× speedup?

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

\\
\left(x \cdot 9\right) \cdot y + b
\end{array}
Derivation
  1. Initial program 74.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. Add Preprocessing
  3. 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}} \]
  4. Applied rewrites9.3%

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

    \[\leadsto \left(9 \cdot \left(x \cdot y\right) - 4 \cdot \left(a \cdot \left(t \cdot z\right)\right)\right) + b \]
  6. Applied rewrites6.1%

    \[\leadsto \left(x \cdot 9\right) \cdot y + b \]
  7. Add Preprocessing

Alternative 9: 7.7% accurate, 4.4× speedup?

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

\\
\left(x \cdot 9\right) \cdot y
\end{array}
Derivation
  1. Initial program 74.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. Add Preprocessing
  3. 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}} \]
  4. Applied rewrites9.3%

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

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

    \[\leadsto \left(x \cdot 9\right) \cdot \color{blue}{y} \]
  7. Add Preprocessing

Alternative 10: 3.0% accurate, 5.3× speedup?

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

\\
z \cdot 4 + b
\end{array}
Derivation
  1. Initial program 74.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. Add Preprocessing
  3. 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}} \]
  4. Applied rewrites9.3%

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

    \[\leadsto -4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b \]
  6. Applied rewrites31.4%

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

    \[\leadsto -4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b \]
  8. Applied rewrites3.1%

    \[\leadsto z \cdot 4 + b \]
  9. Add Preprocessing

Alternative 11: 3.1% accurate, 8.0× speedup?

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

\\
x \cdot 9
\end{array}
Derivation
  1. Initial program 74.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. Add Preprocessing
  3. 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}} \]
  4. Applied rewrites9.3%

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

    \[\leadsto -4 \cdot \left(a \cdot \left(t \cdot z\right)\right) + b \]
  6. Applied rewrites31.4%

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

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

    \[\leadsto x \cdot \color{blue}{9} \]
  9. Add Preprocessing

Developer Target 1: 80.5% accurate, 0.1× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_1 := \frac{b}{c \cdot z}\\ t_2 := 4 \cdot \frac{a \cdot t}{c}\\ t_3 := \left(x \cdot 9\right) \cdot y\\ t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\ t_5 := \frac{t\_4}{z \cdot c}\\ t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\ \mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\ \;\;\;\;t\_6\\ \mathbf{elif}\;t\_5 < 0:\\ \;\;\;\;\frac{\frac{t\_4}{z}}{c}\\ \mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\ \;\;\;\;t\_6\\ \mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\ \;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\ \mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\ \;\;\;\;t\_6\\ \mathbf{else}:\\ \;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\ \end{array} \end{array} \]
(FPCore (x y z t a b c)
 :precision binary64
 (let* ((t_1 (/ b (* c z)))
        (t_2 (* 4.0 (/ (* a t) c)))
        (t_3 (* (* x 9.0) y))
        (t_4 (+ (- t_3 (* (* (* z 4.0) t) a)) b))
        (t_5 (/ t_4 (* z c)))
        (t_6 (/ (+ (- t_3 (* (* z 4.0) (* t a))) b) (* z c))))
   (if (< t_5 -1.100156740804105e-171)
     t_6
     (if (< t_5 0.0)
       (/ (/ t_4 z) c)
       (if (< t_5 1.1708877911747488e-53)
         t_6
         (if (< t_5 2.876823679546137e+130)
           (- (+ (* (* 9.0 (/ y c)) (/ x z)) t_1) t_2)
           (if (< t_5 1.3838515042456319e+158)
             t_6
             (- (+ (* 9.0 (* (/ y (* c z)) x)) t_1) t_2))))))))
double code(double x, double y, double z, double t, double a, double b, double c) {
	double t_1 = b / (c * z);
	double t_2 = 4.0 * ((a * t) / c);
	double t_3 = (x * 9.0) * y;
	double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
	double t_5 = t_4 / (z * c);
	double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
	double tmp;
	if (t_5 < -1.100156740804105e-171) {
		tmp = t_6;
	} else if (t_5 < 0.0) {
		tmp = (t_4 / z) / c;
	} else if (t_5 < 1.1708877911747488e-53) {
		tmp = t_6;
	} else if (t_5 < 2.876823679546137e+130) {
		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
	} else if (t_5 < 1.3838515042456319e+158) {
		tmp = t_6;
	} else {
		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
	}
	return tmp;
}
real(8) function code(x, y, z, t, a, b, c)
    real(8), intent (in) :: x
    real(8), intent (in) :: y
    real(8), intent (in) :: z
    real(8), intent (in) :: t
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_1
    real(8) :: t_2
    real(8) :: t_3
    real(8) :: t_4
    real(8) :: t_5
    real(8) :: t_6
    real(8) :: tmp
    t_1 = b / (c * z)
    t_2 = 4.0d0 * ((a * t) / c)
    t_3 = (x * 9.0d0) * y
    t_4 = (t_3 - (((z * 4.0d0) * t) * a)) + b
    t_5 = t_4 / (z * c)
    t_6 = ((t_3 - ((z * 4.0d0) * (t * a))) + b) / (z * c)
    if (t_5 < (-1.100156740804105d-171)) then
        tmp = t_6
    else if (t_5 < 0.0d0) then
        tmp = (t_4 / z) / c
    else if (t_5 < 1.1708877911747488d-53) then
        tmp = t_6
    else if (t_5 < 2.876823679546137d+130) then
        tmp = (((9.0d0 * (y / c)) * (x / z)) + t_1) - t_2
    else if (t_5 < 1.3838515042456319d+158) then
        tmp = t_6
    else
        tmp = ((9.0d0 * ((y / (c * z)) * x)) + t_1) - 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 = b / (c * z);
	double t_2 = 4.0 * ((a * t) / c);
	double t_3 = (x * 9.0) * y;
	double t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
	double t_5 = t_4 / (z * c);
	double t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
	double tmp;
	if (t_5 < -1.100156740804105e-171) {
		tmp = t_6;
	} else if (t_5 < 0.0) {
		tmp = (t_4 / z) / c;
	} else if (t_5 < 1.1708877911747488e-53) {
		tmp = t_6;
	} else if (t_5 < 2.876823679546137e+130) {
		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
	} else if (t_5 < 1.3838515042456319e+158) {
		tmp = t_6;
	} else {
		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
	}
	return tmp;
}
def code(x, y, z, t, a, b, c):
	t_1 = b / (c * z)
	t_2 = 4.0 * ((a * t) / c)
	t_3 = (x * 9.0) * y
	t_4 = (t_3 - (((z * 4.0) * t) * a)) + b
	t_5 = t_4 / (z * c)
	t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c)
	tmp = 0
	if t_5 < -1.100156740804105e-171:
		tmp = t_6
	elif t_5 < 0.0:
		tmp = (t_4 / z) / c
	elif t_5 < 1.1708877911747488e-53:
		tmp = t_6
	elif t_5 < 2.876823679546137e+130:
		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2
	elif t_5 < 1.3838515042456319e+158:
		tmp = t_6
	else:
		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2
	return tmp
function code(x, y, z, t, a, b, c)
	t_1 = Float64(b / Float64(c * z))
	t_2 = Float64(4.0 * Float64(Float64(a * t) / c))
	t_3 = Float64(Float64(x * 9.0) * y)
	t_4 = Float64(Float64(t_3 - Float64(Float64(Float64(z * 4.0) * t) * a)) + b)
	t_5 = Float64(t_4 / Float64(z * c))
	t_6 = Float64(Float64(Float64(t_3 - Float64(Float64(z * 4.0) * Float64(t * a))) + b) / Float64(z * c))
	tmp = 0.0
	if (t_5 < -1.100156740804105e-171)
		tmp = t_6;
	elseif (t_5 < 0.0)
		tmp = Float64(Float64(t_4 / z) / c);
	elseif (t_5 < 1.1708877911747488e-53)
		tmp = t_6;
	elseif (t_5 < 2.876823679546137e+130)
		tmp = Float64(Float64(Float64(Float64(9.0 * Float64(y / c)) * Float64(x / z)) + t_1) - t_2);
	elseif (t_5 < 1.3838515042456319e+158)
		tmp = t_6;
	else
		tmp = Float64(Float64(Float64(9.0 * Float64(Float64(y / Float64(c * z)) * x)) + t_1) - t_2);
	end
	return tmp
end
function tmp_2 = code(x, y, z, t, a, b, c)
	t_1 = b / (c * z);
	t_2 = 4.0 * ((a * t) / c);
	t_3 = (x * 9.0) * y;
	t_4 = (t_3 - (((z * 4.0) * t) * a)) + b;
	t_5 = t_4 / (z * c);
	t_6 = ((t_3 - ((z * 4.0) * (t * a))) + b) / (z * c);
	tmp = 0.0;
	if (t_5 < -1.100156740804105e-171)
		tmp = t_6;
	elseif (t_5 < 0.0)
		tmp = (t_4 / z) / c;
	elseif (t_5 < 1.1708877911747488e-53)
		tmp = t_6;
	elseif (t_5 < 2.876823679546137e+130)
		tmp = (((9.0 * (y / c)) * (x / z)) + t_1) - t_2;
	elseif (t_5 < 1.3838515042456319e+158)
		tmp = t_6;
	else
		tmp = ((9.0 * ((y / (c * z)) * x)) + t_1) - t_2;
	end
	tmp_2 = tmp;
end
code[x_, y_, z_, t_, a_, b_, c_] := Block[{t$95$1 = N[(b / N[(c * z), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$2 = N[(4.0 * N[(N[(a * t), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(x * 9.0), $MachinePrecision] * y), $MachinePrecision]}, Block[{t$95$4 = N[(N[(t$95$3 - N[(N[(N[(z * 4.0), $MachinePrecision] * t), $MachinePrecision] * a), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision]}, Block[{t$95$5 = N[(t$95$4 / N[(z * c), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$6 = N[(N[(N[(t$95$3 - N[(N[(z * 4.0), $MachinePrecision] * N[(t * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + b), $MachinePrecision] / N[(z * c), $MachinePrecision]), $MachinePrecision]}, If[Less[t$95$5, -1.100156740804105e-171], t$95$6, If[Less[t$95$5, 0.0], N[(N[(t$95$4 / z), $MachinePrecision] / c), $MachinePrecision], If[Less[t$95$5, 1.1708877911747488e-53], t$95$6, If[Less[t$95$5, 2.876823679546137e+130], N[(N[(N[(N[(9.0 * N[(y / c), $MachinePrecision]), $MachinePrecision] * N[(x / z), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision], If[Less[t$95$5, 1.3838515042456319e+158], t$95$6, N[(N[(N[(9.0 * N[(N[(y / N[(c * z), $MachinePrecision]), $MachinePrecision] * x), $MachinePrecision]), $MachinePrecision] + t$95$1), $MachinePrecision] - t$95$2), $MachinePrecision]]]]]]]]]]]]
\begin{array}{l}

\\
\begin{array}{l}
t_1 := \frac{b}{c \cdot z}\\
t_2 := 4 \cdot \frac{a \cdot t}{c}\\
t_3 := \left(x \cdot 9\right) \cdot y\\
t_4 := \left(t\_3 - \left(\left(z \cdot 4\right) \cdot t\right) \cdot a\right) + b\\
t_5 := \frac{t\_4}{z \cdot c}\\
t_6 := \frac{\left(t\_3 - \left(z \cdot 4\right) \cdot \left(t \cdot a\right)\right) + b}{z \cdot c}\\
\mathbf{if}\;t\_5 < -1.100156740804105 \cdot 10^{-171}:\\
\;\;\;\;t\_6\\

\mathbf{elif}\;t\_5 < 0:\\
\;\;\;\;\frac{\frac{t\_4}{z}}{c}\\

\mathbf{elif}\;t\_5 < 1.1708877911747488 \cdot 10^{-53}:\\
\;\;\;\;t\_6\\

\mathbf{elif}\;t\_5 < 2.876823679546137 \cdot 10^{+130}:\\
\;\;\;\;\left(\left(9 \cdot \frac{y}{c}\right) \cdot \frac{x}{z} + t\_1\right) - t\_2\\

\mathbf{elif}\;t\_5 < 1.3838515042456319 \cdot 10^{+158}:\\
\;\;\;\;t\_6\\

\mathbf{else}:\\
\;\;\;\;\left(9 \cdot \left(\frac{y}{c \cdot z} \cdot x\right) + t\_1\right) - t\_2\\


\end{array}
\end{array}

Reproduce

?
herbie shell --seed 2024321 
(FPCore (x y z t a b c)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, J"
  :precision binary64
  :pre (TRUE)

  :alt
  (! :herbie-platform default (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) -220031348160821/200000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 0) (/ (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) z) c) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 365902434742109/31250000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 28768236795461370000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (- (+ (* (* 9 (/ y c)) (/ x z)) (/ b (* c z))) (* 4 (/ (* a t) c))) (if (< (/ (+ (- (* (* x 9) y) (* (* (* z 4) t) a)) b) (* z c)) 138385150424563190000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000) (/ (+ (- (* (* x 9) y) (* (* z 4) (* t a))) b) (* z c)) (- (+ (* 9 (* (/ y (* c z)) x)) (/ b (* c z))) (* 4 (/ (* a t) c)))))))))

  (/ (+ (- (* (* x 9.0) y) (* (* (* z 4.0) t) a)) b) (* z c)))