?

Average Accuracy: 55.8% → 92.0%
Time: 32.5s
Precision: binary64
Cost: 126276

?

\[\left(\left(1.0536712127723509 \cdot 10^{-8} < a \land a < 94906265.62425156\right) \land \left(1.0536712127723509 \cdot 10^{-8} < b \land b < 94906265.62425156\right)\right) \land \left(1.0536712127723509 \cdot 10^{-8} < c \land c < 94906265.62425156\right)\]
\[\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} \]
(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}

Error?

Derivation?

  1. Split input into 2 regimes
  2. if b < 0.309999999999999998

    1. Initial program 82.6%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Simplified82.6%

      \[\leadsto \color{blue}{\frac{b - \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{a} \cdot -0.3333333333333333} \]
      Proof

      [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}} \]
    3. Applied egg-rr83.4%

      \[\leadsto \color{blue}{\frac{\left(\left({b}^{3} - {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{1.5}\right) \cdot \frac{1}{a}\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)}} \]
    4. Applied egg-rr83.2%

      \[\leadsto \frac{\color{blue}{{\left(\sqrt[3]{\frac{{b}^{3} - {\left(\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\right)}^{1.5}}{a}}\right)}^{3}} \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)} \]
    5. Applied egg-rr83.6%

      \[\leadsto \frac{\color{blue}{\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)} \]
    6. Simplified83.6%

      \[\leadsto \frac{\color{blue}{\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{\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)} \]
      Proof

      [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

    1. Initial program 51.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Simplified51.8%

      \[\leadsto \color{blue}{\left(b - \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}\right) \cdot \frac{-0.3333333333333333}{a}} \]
      Proof

      [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}} \]
    3. Applied egg-rr51.8%

      \[\leadsto \color{blue}{\frac{1}{\left(a \cdot -3\right) \cdot \frac{1}{b - \sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}}} \]
    4. Taylor expanded in b around inf 93.2%

      \[\leadsto \frac{1}{\color{blue}{-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)}} \]
    5. Simplified93.2%

      \[\leadsto \frac{1}{\color{blue}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(3, \frac{\mathsf{fma}\left(-0.5625, {a}^{3} \cdot \left(c \cdot c\right), \mathsf{fma}\left(0.2222222222222222, \frac{{\left(-1.125 \cdot \left(\left(a \cdot a\right) \cdot \left(c \cdot c\right)\right)\right)}^{2} + 5.0625 \cdot \left({c}^{4} \cdot {a}^{4}\right)}{a \cdot \left(c \cdot c\right)}, -0.75 \cdot \left(c \cdot \left(a \cdot \left(\left(c \cdot \left(a \cdot a\right)\right) \cdot 0.375\right)\right)\right)\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)}} \]
      Proof

      [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)} \]
    6. Taylor expanded in c around 0 93.2%

      \[\leadsto \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(3, \color{blue}{\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)} \]
    7. Simplified93.2%

      \[\leadsto \frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(3, \color{blue}{\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)} \]
      Proof

      [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)} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification92.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq 0.31:\\ \;\;\;\;\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{\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)}\\ \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} \]

Alternatives

Alternative 1
Accuracy92.0%
Cost80644
\[\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{-0.3333333333333333 \cdot \left(\frac{{b}^{6} - t_1 \cdot t_1}{{b}^{3} + t_1} \cdot \frac{1}{a}\right)}{\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} \]
Alternative 2
Accuracy92.0%
Cost47684
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ \mathbf{if}\;b \leq 0.315:\\ \;\;\;\;\frac{1}{\left(a \cdot -3\right) \cdot \left(\frac{1}{b \cdot b - t_0} \cdot \left(b + \sqrt{t_0}\right)\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} \]
Alternative 3
Accuracy91.8%
Cost28804
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ \mathbf{if}\;b \leq 0.33:\\ \;\;\;\;\frac{1}{\left(a \cdot -3\right) \cdot \left(\frac{1}{b \cdot b - t_0} \cdot \left(b + \sqrt{t_0}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{\frac{1}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{a \cdot c}, \frac{-0.5}{b}\right) - \left(\frac{a \cdot a}{{b}^{5}} \cdot \left(0.2222222222222222 \cdot \left(\frac{{c}^{4}}{c} \cdot \frac{6.328125}{c}\right) + -0.84375 \cdot \left(c \cdot c\right)\right) + \frac{a \cdot c}{\frac{{b}^{3}}{0.375}}\right)}}{a}\\ \end{array} \]
Alternative 4
Accuracy89.9%
Cost21188
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ \mathbf{if}\;b \leq 0.31:\\ \;\;\;\;\frac{1}{\left(a \cdot -3\right) \cdot \left(\frac{1}{b \cdot b - t_0} \cdot \left(b + \sqrt{t_0}\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(c \cdot 3, \frac{\left(a \cdot a\right) \cdot 0.375}{{b}^{3}}, \frac{1.5}{\frac{b}{a}}\right)\right)}\\ \end{array} \]
Alternative 5
Accuracy89.9%
Cost20932
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ \mathbf{if}\;b \leq 0.32:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\frac{t_0 - b \cdot b}{a}}{b + \sqrt{t_0}}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(c \cdot 3, \frac{\left(a \cdot a\right) \cdot 0.375}{{b}^{3}}, \frac{1.5}{\frac{b}{a}}\right)\right)}\\ \end{array} \]
Alternative 6
Accuracy89.9%
Cost20932
\[\begin{array}{l} t_0 := \mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)\\ \mathbf{if}\;b \leq 0.315:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{\frac{b \cdot b - t_0}{b + \sqrt{t_0}}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(c \cdot 3, \frac{\left(a \cdot a\right) \cdot 0.375}{{b}^{3}}, \frac{1.5}{\frac{b}{a}}\right)\right)}\\ \end{array} \]
Alternative 7
Accuracy89.7%
Cost20740
\[\begin{array}{l} \mathbf{if}\;b \leq 0.31:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\mathsf{fma}\left(-2, \frac{b}{c}, \mathsf{fma}\left(c \cdot 3, \frac{\left(a \cdot a\right) \cdot 0.375}{{b}^{3}}, \frac{1.5}{\frac{b}{a}}\right)\right)}\\ \end{array} \]
Alternative 8
Accuracy84.7%
Cost14788
\[\begin{array}{l} \mathbf{if}\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3} \leq -0.00031:\\ \;\;\;\;\frac{\sqrt{b \cdot b + -3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} - \frac{b}{c} \cdot 2}\\ \end{array} \]
Alternative 9
Accuracy89.5%
Cost14468
\[\begin{array}{l} \mathbf{if}\;b \leq 0.33:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{\frac{1}{\mathsf{fma}\left(0.6666666666666666, \frac{b}{a \cdot c}, \frac{-0.5}{b}\right) + c \cdot \frac{a \cdot -0.375}{{b}^{3}}}}{a}\\ \end{array} \]
Alternative 10
Accuracy89.4%
Cost13764
\[\begin{array}{l} \mathbf{if}\;b \leq 0.31:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{b - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(a \cdot c\right)\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(a \cdot -3\right) \cdot \left(\left(\frac{0.375 \cdot \left(a \cdot c\right) + \left(a \cdot c\right) \cdot -0.75}{{b}^{3}} + 0.6666666666666666 \cdot \frac{b}{a \cdot c}\right) + -0.5 \cdot \frac{1}{b}\right)}\\ \end{array} \]
Alternative 11
Accuracy89.5%
Cost8708
\[\begin{array}{l} \mathbf{if}\;b \leq 0.315:\\ \;\;\;\;\frac{\sqrt{b \cdot b + -3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;-0.3333333333333333 \cdot \frac{\frac{1}{\left(\frac{0.375 \cdot \left(a \cdot c\right) + \left(a \cdot c\right) \cdot -0.75}{{b}^{3}} + 0.6666666666666666 \cdot \frac{b}{a \cdot c}\right) + -0.5 \cdot \frac{1}{b}}}{a}\\ \end{array} \]
Alternative 12
Accuracy89.4%
Cost8708
\[\begin{array}{l} \mathbf{if}\;b \leq 0.31:\\ \;\;\;\;\frac{\sqrt{b \cdot b + -3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{\left(a \cdot -3\right) \cdot \left(\left(\frac{0.375 \cdot \left(a \cdot c\right) + \left(a \cdot c\right) \cdot -0.75}{{b}^{3}} + 0.6666666666666666 \cdot \frac{b}{a \cdot c}\right) + -0.5 \cdot \frac{1}{b}\right)}\\ \end{array} \]
Alternative 13
Accuracy85.3%
Cost7492
\[\begin{array}{l} \mathbf{if}\;b \leq 3.4:\\ \;\;\;\;\left(b - \sqrt{b \cdot b + a \cdot \left(c \cdot -3\right)}\right) \cdot \frac{-0.3333333333333333}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{1.5 \cdot \frac{a}{b} - \frac{b}{c} \cdot 2}\\ \end{array} \]
Alternative 14
Accuracy82.0%
Cost832
\[\frac{1}{1.5 \cdot \frac{a}{b} - \frac{b}{c} \cdot 2} \]
Alternative 15
Accuracy11.7%
Cost320
\[-0.3333333333333333 \cdot \frac{b}{a} \]
Alternative 16
Accuracy12.1%
Cost320
\[\frac{b}{a} \cdot -0.1111111111111111 \]
Alternative 17
Accuracy64.1%
Cost320
\[\frac{-0.5}{\frac{b}{c}} \]
Alternative 18
Accuracy64.1%
Cost320
\[\frac{c \cdot -0.5}{b} \]

Error

Reproduce?

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)))