| Alternative 1 | |
|---|---|
| Accuracy | 92.0% |
| Cost | 80644 |
(FPCore (a b c) :precision binary64 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
(FPCore (a b c)
:precision binary64
(let* ((t_0 (fma a (* c -3.0) (* b b))) (t_1 (pow t_0 1.5)))
(if (<= b 0.31)
(/
(*
(/
(sqrt (- (pow b 9.0) (pow t_0 4.5)))
(/
(sqrt (+ (+ (pow b 6.0) (pow t_0 3.0)) (* (pow b 3.0) t_1)))
(/ (sqrt (- (pow b 3.0) t_1)) a)))
-0.3333333333333333)
(fma b b (+ t_0 (* b (sqrt t_0)))))
(/
1.0
(fma
-2.0
(/ b c)
(fma
3.0
(*
(/ c (/ (pow b 5.0) c))
(+
(* 0.2222222222222222 (/ (pow a 4.0) (/ a 6.328125)))
(* (pow a 3.0) -0.84375)))
(fma 1.5 (/ a b) (* 3.0 (/ (* (* c (* a a)) 0.375) (pow b 3.0))))))))))double code(double a, double b, double c) {
return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
double code(double a, double b, double c) {
double t_0 = fma(a, (c * -3.0), (b * b));
double t_1 = pow(t_0, 1.5);
double tmp;
if (b <= 0.31) {
tmp = ((sqrt((pow(b, 9.0) - pow(t_0, 4.5))) / (sqrt(((pow(b, 6.0) + pow(t_0, 3.0)) + (pow(b, 3.0) * t_1))) / (sqrt((pow(b, 3.0) - t_1)) / a))) * -0.3333333333333333) / fma(b, b, (t_0 + (b * sqrt(t_0))));
} else {
tmp = 1.0 / fma(-2.0, (b / c), fma(3.0, ((c / (pow(b, 5.0) / c)) * ((0.2222222222222222 * (pow(a, 4.0) / (a / 6.328125))) + (pow(a, 3.0) * -0.84375))), fma(1.5, (a / b), (3.0 * (((c * (a * a)) * 0.375) / pow(b, 3.0))))));
}
return tmp;
}
function code(a, b, c) return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a)) end
function code(a, b, c) t_0 = fma(a, Float64(c * -3.0), Float64(b * b)) t_1 = t_0 ^ 1.5 tmp = 0.0 if (b <= 0.31) tmp = Float64(Float64(Float64(sqrt(Float64((b ^ 9.0) - (t_0 ^ 4.5))) / Float64(sqrt(Float64(Float64((b ^ 6.0) + (t_0 ^ 3.0)) + Float64((b ^ 3.0) * t_1))) / Float64(sqrt(Float64((b ^ 3.0) - t_1)) / a))) * -0.3333333333333333) / fma(b, b, Float64(t_0 + Float64(b * sqrt(t_0))))); else tmp = Float64(1.0 / fma(-2.0, Float64(b / c), fma(3.0, Float64(Float64(c / Float64((b ^ 5.0) / c)) * Float64(Float64(0.2222222222222222 * Float64((a ^ 4.0) / Float64(a / 6.328125))) + Float64((a ^ 3.0) * -0.84375))), fma(1.5, Float64(a / b), Float64(3.0 * Float64(Float64(Float64(c * Float64(a * a)) * 0.375) / (b ^ 3.0))))))); end return tmp end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
code[a_, b_, c_] := Block[{t$95$0 = N[(a * N[(c * -3.0), $MachinePrecision] + N[(b * b), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[Power[t$95$0, 1.5], $MachinePrecision]}, If[LessEqual[b, 0.31], N[(N[(N[(N[Sqrt[N[(N[Power[b, 9.0], $MachinePrecision] - N[Power[t$95$0, 4.5], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[N[(N[(N[Power[b, 6.0], $MachinePrecision] + N[Power[t$95$0, 3.0], $MachinePrecision]), $MachinePrecision] + N[(N[Power[b, 3.0], $MachinePrecision] * t$95$1), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / N[(N[Sqrt[N[(N[Power[b, 3.0], $MachinePrecision] - t$95$1), $MachinePrecision]], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * -0.3333333333333333), $MachinePrecision] / N[(b * b + N[(t$95$0 + N[(b * N[Sqrt[t$95$0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(1.0 / N[(-2.0 * N[(b / c), $MachinePrecision] + N[(3.0 * N[(N[(c / N[(N[Power[b, 5.0], $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision] * N[(N[(0.2222222222222222 * N[(N[Power[a, 4.0], $MachinePrecision] / N[(a / 6.328125), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(N[Power[a, 3.0], $MachinePrecision] * -0.84375), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(1.5 * N[(a / b), $MachinePrecision] + N[(3.0 * N[(N[(N[(c * N[(a * a), $MachinePrecision]), $MachinePrecision] * 0.375), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]]]]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\begin{array}{l}
t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\
t_1 := {t_0}^{1.5}\\
\mathbf{if}\;b \leq 0.31:\\
\;\;\;\;\frac{\frac{\sqrt{{b}^{9} - {t_0}^{4.5}}}{\frac{\sqrt{\left({b}^{6} + {t_0}^{3}\right) + {b}^{3} \cdot t_1}}{\frac{\sqrt{{b}^{3} - t_1}}{a}}} \cdot -0.3333333333333333}{\mathsf{fma}\left(b, b, t_0 + b \cdot \sqrt{t_0}\right)}\\
\mathbf{else}:\\
\;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(3, \frac{c}{\frac{{b}^{5}}{c}} \cdot \left(0.2222222222222222 \cdot \frac{{a}^{4}}{\frac{a}{6.328125}} + {a}^{3} \cdot -0.84375\right), \mathsf{fma}\left(1.5, \frac{a}{b}, 3 \cdot \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot 0.375}{{b}^{3}}\right)\right)\right)}\\
\end{array}
if b < 0.309999999999999998Initial program 82.6%
Simplified82.6%
[Start]82.6 | \[ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\] |
|---|---|
*-lft-identity [<=]82.6 | \[ \color{blue}{1 \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}}
\] |
metadata-eval [<=]82.6 | \[ \color{blue}{\frac{-1}{-1}} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\] |
times-frac [<=]82.6 | \[ \color{blue}{\frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{-1 \cdot \left(3 \cdot a\right)}}
\] |
neg-mul-1 [<=]82.6 | \[ \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{-3 \cdot a}}
\] |
distribute-rgt-neg-in [=>]82.6 | \[ \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{3 \cdot \left(-a\right)}}
\] |
times-frac [=>]82.6 | \[ \color{blue}{\frac{-1}{3} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a}}
\] |
*-commutative [=>]82.6 | \[ \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a} \cdot \frac{-1}{3}}
\] |
Applied egg-rr83.4%
Applied egg-rr83.2%
Applied egg-rr83.6%
Simplified83.6%
[Start]83.6 | \[ \frac{\frac{\sqrt{{b}^{9} - {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{4.5}} \cdot \left(\sqrt{{b}^{3} - {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{1.5}} \cdot \frac{1}{a}\right)}{\sqrt{{b}^{6} + \left({\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{3} + {b}^{3} \cdot {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{1.5}\right)}} \cdot -0.3333333333333333}{\mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) + b \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}\right)}
\] |
|---|---|
associate-/l* [=>]83.6 | \[ \frac{\color{blue}{\frac{\sqrt{{b}^{9} - {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{4.5}}}{\frac{\sqrt{{b}^{6} + \left({\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{3} + {b}^{3} \cdot {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{1.5}\right)}}{\sqrt{{b}^{3} - {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{1.5}} \cdot \frac{1}{a}}}} \cdot -0.3333333333333333}{\mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) + b \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}\right)}
\] |
associate-+r+ [=>]83.6 | \[ \frac{\frac{\sqrt{{b}^{9} - {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{4.5}}}{\frac{\sqrt{\color{blue}{\left({b}^{6} + {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{3}\right) + {b}^{3} \cdot {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{1.5}}}}{\sqrt{{b}^{3} - {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{1.5}} \cdot \frac{1}{a}}} \cdot -0.3333333333333333}{\mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) + b \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}\right)}
\] |
associate-*r/ [=>]83.6 | \[ \frac{\frac{\sqrt{{b}^{9} - {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{4.5}}}{\frac{\sqrt{\left({b}^{6} + {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{3}\right) + {b}^{3} \cdot {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{1.5}}}{\color{blue}{\frac{\sqrt{{b}^{3} - {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{1.5}} \cdot 1}{a}}}} \cdot -0.3333333333333333}{\mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) + b \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}\right)}
\] |
*-rgt-identity [=>]83.6 | \[ \frac{\frac{\sqrt{{b}^{9} - {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{4.5}}}{\frac{\sqrt{\left({b}^{6} + {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{3}\right) + {b}^{3} \cdot {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{1.5}}}{\frac{\color{blue}{\sqrt{{b}^{3} - {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{1.5}}}}{a}}} \cdot -0.3333333333333333}{\mathsf{fma}\left(b, b, \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right) + b \cdot \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}\right)}
\] |
if 0.309999999999999998 < b Initial program 51.8%
Simplified51.8%
[Start]51.8 | \[ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\] |
|---|---|
remove-double-neg [<=]51.8 | \[ \frac{\left(-b\right) + \color{blue}{\left(-\left(-\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)\right)}}{3 \cdot a}
\] |
sub-neg [<=]51.8 | \[ \frac{\color{blue}{\left(-b\right) - \left(-\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}{3 \cdot a}
\] |
div-sub [=>]51.1 | \[ \color{blue}{\frac{-b}{3 \cdot a} - \frac{-\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}}
\] |
neg-mul-1 [=>]51.1 | \[ \frac{\color{blue}{-1 \cdot b}}{3 \cdot a} - \frac{-\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\] |
associate-*l/ [<=]50.9 | \[ \color{blue}{\frac{-1}{3 \cdot a} \cdot b} - \frac{-\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\] |
distribute-frac-neg [=>]50.9 | \[ \frac{-1}{3 \cdot a} \cdot b - \color{blue}{\left(-\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\right)}
\] |
fma-neg [=>]51.9 | \[ \color{blue}{\mathsf{fma}\left(\frac{-1}{3 \cdot a}, b, -\left(-\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\right)\right)}
\] |
/-rgt-identity [<=]51.9 | \[ \mathsf{fma}\left(\frac{-1}{3 \cdot a}, \color{blue}{\frac{b}{1}}, -\left(-\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\right)\right)
\] |
metadata-eval [<=]51.9 | \[ \mathsf{fma}\left(\frac{-1}{3 \cdot a}, \frac{b}{\color{blue}{\frac{-1}{-1}}}, -\left(-\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\right)\right)
\] |
associate-/l* [<=]51.9 | \[ \mathsf{fma}\left(\frac{-1}{3 \cdot a}, \color{blue}{\frac{b \cdot -1}{-1}}, -\left(-\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\right)\right)
\] |
*-commutative [<=]51.9 | \[ \mathsf{fma}\left(\frac{-1}{3 \cdot a}, \frac{\color{blue}{-1 \cdot b}}{-1}, -\left(-\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\right)\right)
\] |
neg-mul-1 [<=]51.9 | \[ \mathsf{fma}\left(\frac{-1}{3 \cdot a}, \frac{\color{blue}{-b}}{-1}, -\left(-\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\right)\right)
\] |
fma-neg [<=]50.9 | \[ \color{blue}{\frac{-1}{3 \cdot a} \cdot \frac{-b}{-1} - \left(-\frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\right)}
\] |
neg-mul-1 [=>]50.9 | \[ \frac{-1}{3 \cdot a} \cdot \frac{-b}{-1} - \color{blue}{-1 \cdot \frac{\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}}
\] |
Applied egg-rr51.8%
Taylor expanded in b around inf 93.2%
Simplified93.2%
[Start]93.2 | \[ \frac{1}{-2 \cdot \frac{b}{c} + \left(3 \cdot \frac{-0.5625 \cdot \left({c}^{2} \cdot {a}^{3}\right) + \left(0.2222222222222222 \cdot \frac{{\left(-1.125 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 5.0625 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{{c}^{2} \cdot a} + -0.75 \cdot \left(c \cdot \left(a \cdot \left(0.75 \cdot \left(c \cdot {a}^{2}\right) + -0.375 \cdot \left(c \cdot {a}^{2}\right)\right)\right)\right)\right)}{{b}^{5}} + \left(1.5 \cdot \frac{a}{b} + 3 \cdot \frac{0.75 \cdot \left(c \cdot {a}^{2}\right) + -0.375 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}\right)\right)}
\] |
|---|---|
fma-def [=>]93.2 | \[ \frac{1}{\color{blue}{\mathsf{fma}\left(-2, \frac{b}{c}, 3 \cdot \frac{-0.5625 \cdot \left({c}^{2} \cdot {a}^{3}\right) + \left(0.2222222222222222 \cdot \frac{{\left(-1.125 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 5.0625 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{{c}^{2} \cdot a} + -0.75 \cdot \left(c \cdot \left(a \cdot \left(0.75 \cdot \left(c \cdot {a}^{2}\right) + -0.375 \cdot \left(c \cdot {a}^{2}\right)\right)\right)\right)\right)}{{b}^{5}} + \left(1.5 \cdot \frac{a}{b} + 3 \cdot \frac{0.75 \cdot \left(c \cdot {a}^{2}\right) + -0.375 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}\right)\right)}}
\] |
fma-def [=>]93.2 | \[ \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \color{blue}{\mathsf{fma}\left(3, \frac{-0.5625 \cdot \left({c}^{2} \cdot {a}^{3}\right) + \left(0.2222222222222222 \cdot \frac{{\left(-1.125 \cdot \left({c}^{2} \cdot {a}^{2}\right)\right)}^{2} + 5.0625 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{{c}^{2} \cdot a} + -0.75 \cdot \left(c \cdot \left(a \cdot \left(0.75 \cdot \left(c \cdot {a}^{2}\right) + -0.375 \cdot \left(c \cdot {a}^{2}\right)\right)\right)\right)\right)}{{b}^{5}}, 1.5 \cdot \frac{a}{b} + 3 \cdot \frac{0.75 \cdot \left(c \cdot {a}^{2}\right) + -0.375 \cdot \left(c \cdot {a}^{2}\right)}{{b}^{3}}\right)}\right)}
\] |
Taylor expanded in c around 0 93.2%
Simplified93.2%
[Start]93.2 | \[ \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(3, \frac{{c}^{2} \cdot \left(-0.5625 \cdot {a}^{3} + \left(0.2222222222222222 \cdot \frac{1.265625 \cdot {a}^{4} + 5.0625 \cdot {a}^{4}}{a} + -0.28125 \cdot {a}^{3}\right)\right)}{{b}^{5}}, \mathsf{fma}\left(1.5, \frac{a}{b}, 3 \cdot \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot 0.375}{{b}^{3}}\right)\right)\right)}
\] |
|---|---|
associate-*l/ [<=]93.2 | \[ \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(3, \color{blue}{\frac{{c}^{2}}{{b}^{5}} \cdot \left(-0.5625 \cdot {a}^{3} + \left(0.2222222222222222 \cdot \frac{1.265625 \cdot {a}^{4} + 5.0625 \cdot {a}^{4}}{a} + -0.28125 \cdot {a}^{3}\right)\right)}, \mathsf{fma}\left(1.5, \frac{a}{b}, 3 \cdot \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot 0.375}{{b}^{3}}\right)\right)\right)}
\] |
+-commutative [=>]93.2 | \[ \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(3, \frac{{c}^{2}}{{b}^{5}} \cdot \left(-0.5625 \cdot {a}^{3} + \color{blue}{\left(-0.28125 \cdot {a}^{3} + 0.2222222222222222 \cdot \frac{1.265625 \cdot {a}^{4} + 5.0625 \cdot {a}^{4}}{a}\right)}\right), \mathsf{fma}\left(1.5, \frac{a}{b}, 3 \cdot \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot 0.375}{{b}^{3}}\right)\right)\right)}
\] |
associate-+r+ [=>]93.2 | \[ \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(3, \frac{{c}^{2}}{{b}^{5}} \cdot \color{blue}{\left(\left(-0.5625 \cdot {a}^{3} + -0.28125 \cdot {a}^{3}\right) + 0.2222222222222222 \cdot \frac{1.265625 \cdot {a}^{4} + 5.0625 \cdot {a}^{4}}{a}\right)}, \mathsf{fma}\left(1.5, \frac{a}{b}, 3 \cdot \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot 0.375}{{b}^{3}}\right)\right)\right)}
\] |
unpow2 [=>]93.2 | \[ \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(3, \frac{\color{blue}{c \cdot c}}{{b}^{5}} \cdot \left(\left(-0.5625 \cdot {a}^{3} + -0.28125 \cdot {a}^{3}\right) + 0.2222222222222222 \cdot \frac{1.265625 \cdot {a}^{4} + 5.0625 \cdot {a}^{4}}{a}\right), \mathsf{fma}\left(1.5, \frac{a}{b}, 3 \cdot \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot 0.375}{{b}^{3}}\right)\right)\right)}
\] |
associate-/l* [=>]93.2 | \[ \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(3, \color{blue}{\frac{c}{\frac{{b}^{5}}{c}}} \cdot \left(\left(-0.5625 \cdot {a}^{3} + -0.28125 \cdot {a}^{3}\right) + 0.2222222222222222 \cdot \frac{1.265625 \cdot {a}^{4} + 5.0625 \cdot {a}^{4}}{a}\right), \mathsf{fma}\left(1.5, \frac{a}{b}, 3 \cdot \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot 0.375}{{b}^{3}}\right)\right)\right)}
\] |
+-commutative [=>]93.2 | \[ \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(3, \frac{c}{\frac{{b}^{5}}{c}} \cdot \color{blue}{\left(0.2222222222222222 \cdot \frac{1.265625 \cdot {a}^{4} + 5.0625 \cdot {a}^{4}}{a} + \left(-0.5625 \cdot {a}^{3} + -0.28125 \cdot {a}^{3}\right)\right)}, \mathsf{fma}\left(1.5, \frac{a}{b}, 3 \cdot \frac{\left(c \cdot \left(a \cdot a\right)\right) \cdot 0.375}{{b}^{3}}\right)\right)\right)}
\] |
Final simplification92.0%
| Alternative 1 | |
|---|---|
| Accuracy | 92.0% |
| Cost | 80644 |
| Alternative 2 | |
|---|---|
| Accuracy | 92.0% |
| Cost | 47684 |
| Alternative 3 | |
|---|---|
| Accuracy | 91.8% |
| Cost | 28804 |
| Alternative 4 | |
|---|---|
| Accuracy | 89.9% |
| Cost | 21188 |
| Alternative 5 | |
|---|---|
| Accuracy | 89.9% |
| Cost | 20932 |
| Alternative 6 | |
|---|---|
| Accuracy | 89.9% |
| Cost | 20932 |
| Alternative 7 | |
|---|---|
| Accuracy | 89.7% |
| Cost | 20740 |
| Alternative 8 | |
|---|---|
| Accuracy | 84.7% |
| Cost | 14788 |
| Alternative 9 | |
|---|---|
| Accuracy | 89.5% |
| Cost | 14468 |
| Alternative 10 | |
|---|---|
| Accuracy | 89.4% |
| Cost | 13764 |
| Alternative 11 | |
|---|---|
| Accuracy | 89.5% |
| Cost | 8708 |
| Alternative 12 | |
|---|---|
| Accuracy | 89.4% |
| Cost | 8708 |
| Alternative 13 | |
|---|---|
| Accuracy | 85.3% |
| Cost | 7492 |
| Alternative 14 | |
|---|---|
| Accuracy | 82.0% |
| Cost | 832 |
| Alternative 15 | |
|---|---|
| Accuracy | 11.7% |
| Cost | 320 |
| Alternative 16 | |
|---|---|
| Accuracy | 12.1% |
| Cost | 320 |
| Alternative 17 | |
|---|---|
| Accuracy | 64.1% |
| Cost | 320 |
| Alternative 18 | |
|---|---|
| Accuracy | 64.1% |
| Cost | 320 |
herbie shell --seed 2023129
(FPCore (a b c)
:name "Cubic critical, narrow range"
:precision binary64
:pre (and (and (and (< 1.0536712127723509e-8 a) (< a 94906265.62425156)) (and (< 1.0536712127723509e-8 b) (< b 94906265.62425156))) (and (< 1.0536712127723509e-8 c) (< c 94906265.62425156)))
(/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))