ABCF->ab-angle b

?

Percentage Accurate: 19.5% → 47.6%
Time: 35.9s
Precision: binary64
Cost: 34120

?

\[ \begin{array}{c}[A, C] = \mathsf{sort}([A, C])\\ \end{array} \]
\[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_1 := B \cdot \left(B \cdot 2\right)\\ \mathbf{if}\;B \leq -3.45 \cdot 10^{+140}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{elif}\;B \leq -1.9 \cdot 10^{-37}:\\ \;\;\;\;\frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, t_1\right)} \cdot \sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 2 \cdot 10^{-81}:\\ \;\;\;\;\frac{-\sqrt{t_0 \cdot \left(\left(F \cdot 2\right) \cdot \left(A + A\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 8.2 \cdot 10^{+14}:\\ \;\;\;\;\frac{\sqrt{\left(A + \left(A + \frac{B}{\frac{C}{B}} \cdot -0.5\right)\right) \cdot \left(F \cdot \left(C \cdot \left(A \cdot -8\right)\right) + F \cdot t_1\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}\right)\\ \end{array} \]
(FPCore (A B C F)
 :precision binary64
 (/
  (-
   (sqrt
    (*
     (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F))
     (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0)))))))
  (- (pow B 2.0) (* (* 4.0 A) C))))
(FPCore (A B C F)
 :precision binary64
 (let* ((t_0 (fma B B (* A (* C -4.0)))) (t_1 (* B (* B 2.0))))
   (if (<= B -3.45e+140)
     (* (sqrt (/ F B)) (- (sqrt 2.0)))
     (if (<= B -1.9e-37)
       (/
        (-
         (*
          (sqrt (fma C (* A -8.0) t_1))
          (sqrt (* F (+ C (- A (hypot B (- A C))))))))
        t_0)
       (if (<= B 2e-81)
         (/ (- (sqrt (* t_0 (* (* F 2.0) (+ A A))))) t_0)
         (if (<= B 8.2e+14)
           (/
            (sqrt
             (*
              (+ A (+ A (* (/ B (/ C B)) -0.5)))
              (+ (* F (* C (* A -8.0))) (* F t_1))))
            (- (fma B B (* C (* A -4.0)))))
           (* (/ (sqrt 2.0) B) (- (sqrt (* F (- A (hypot B A))))))))))))
double code(double A, double B, double C, double F) {
	return -sqrt(((2.0 * ((pow(B, 2.0) - ((4.0 * A) * C)) * F)) * ((A + C) - sqrt((pow((A - C), 2.0) + pow(B, 2.0)))))) / (pow(B, 2.0) - ((4.0 * A) * C));
}
double code(double A, double B, double C, double F) {
	double t_0 = fma(B, B, (A * (C * -4.0)));
	double t_1 = B * (B * 2.0);
	double tmp;
	if (B <= -3.45e+140) {
		tmp = sqrt((F / B)) * -sqrt(2.0);
	} else if (B <= -1.9e-37) {
		tmp = -(sqrt(fma(C, (A * -8.0), t_1)) * sqrt((F * (C + (A - hypot(B, (A - C))))))) / t_0;
	} else if (B <= 2e-81) {
		tmp = -sqrt((t_0 * ((F * 2.0) * (A + A)))) / t_0;
	} else if (B <= 8.2e+14) {
		tmp = sqrt(((A + (A + ((B / (C / B)) * -0.5))) * ((F * (C * (A * -8.0))) + (F * t_1)))) / -fma(B, B, (C * (A * -4.0)));
	} else {
		tmp = (sqrt(2.0) / B) * -sqrt((F * (A - hypot(B, A))));
	}
	return tmp;
}
function code(A, B, C, F)
	return Float64(Float64(-sqrt(Float64(Float64(2.0 * Float64(Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)) * F)) * Float64(Float64(A + C) - sqrt(Float64((Float64(A - C) ^ 2.0) + (B ^ 2.0))))))) / Float64((B ^ 2.0) - Float64(Float64(4.0 * A) * C)))
end
function code(A, B, C, F)
	t_0 = fma(B, B, Float64(A * Float64(C * -4.0)))
	t_1 = Float64(B * Float64(B * 2.0))
	tmp = 0.0
	if (B <= -3.45e+140)
		tmp = Float64(sqrt(Float64(F / B)) * Float64(-sqrt(2.0)));
	elseif (B <= -1.9e-37)
		tmp = Float64(Float64(-Float64(sqrt(fma(C, Float64(A * -8.0), t_1)) * sqrt(Float64(F * Float64(C + Float64(A - hypot(B, Float64(A - C)))))))) / t_0);
	elseif (B <= 2e-81)
		tmp = Float64(Float64(-sqrt(Float64(t_0 * Float64(Float64(F * 2.0) * Float64(A + A))))) / t_0);
	elseif (B <= 8.2e+14)
		tmp = Float64(sqrt(Float64(Float64(A + Float64(A + Float64(Float64(B / Float64(C / B)) * -0.5))) * Float64(Float64(F * Float64(C * Float64(A * -8.0))) + Float64(F * t_1)))) / Float64(-fma(B, B, Float64(C * Float64(A * -4.0)))));
	else
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(A - hypot(B, A))))));
	end
	return tmp
end
code[A_, B_, C_, F_] := N[((-N[Sqrt[N[(N[(2.0 * N[(N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision] * F), $MachinePrecision]), $MachinePrecision] * N[(N[(A + C), $MachinePrecision] - N[Sqrt[N[(N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision] + N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[Power[B, 2.0], $MachinePrecision] - N[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[A_, B_, C_, F_] := Block[{t$95$0 = N[(B * B + N[(A * N[(C * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$1 = N[(B * N[(B * 2.0), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[B, -3.45e+140], N[(N[Sqrt[N[(F / B), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[2.0], $MachinePrecision])), $MachinePrecision], If[LessEqual[B, -1.9e-37], N[((-N[(N[Sqrt[N[(C * N[(A * -8.0), $MachinePrecision] + t$95$1), $MachinePrecision]], $MachinePrecision] * N[Sqrt[N[(F * N[(C + N[(A - N[Sqrt[B ^ 2 + N[(A - C), $MachinePrecision] ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 2e-81], N[((-N[Sqrt[N[(t$95$0 * N[(N[(F * 2.0), $MachinePrecision] * N[(A + A), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$0), $MachinePrecision], If[LessEqual[B, 8.2e+14], N[(N[Sqrt[N[(N[(A + N[(A + N[(N[(B / N[(C / B), $MachinePrecision]), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(N[(F * N[(C * N[(A * -8.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(F * t$95$1), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / (-N[(B * B + N[(C * N[(A * -4.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision])), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(A - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision])), $MachinePrecision]]]]]]]
\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C}
\begin{array}{l}
t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\
t_1 := B \cdot \left(B \cdot 2\right)\\
\mathbf{if}\;B \leq -3.45 \cdot 10^{+140}:\\
\;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\

\mathbf{elif}\;B \leq -1.9 \cdot 10^{-37}:\\
\;\;\;\;\frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, t_1\right)} \cdot \sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{t_0}\\

\mathbf{elif}\;B \leq 2 \cdot 10^{-81}:\\
\;\;\;\;\frac{-\sqrt{t_0 \cdot \left(\left(F \cdot 2\right) \cdot \left(A + A\right)\right)}}{t_0}\\

\mathbf{elif}\;B \leq 8.2 \cdot 10^{+14}:\\
\;\;\;\;\frac{\sqrt{\left(A + \left(A + \frac{B}{\frac{C}{B}} \cdot -0.5\right)\right) \cdot \left(F \cdot \left(C \cdot \left(A \cdot -8\right)\right) + F \cdot t_1\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\

\mathbf{else}:\\
\;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}\right)\\


\end{array}

Local Percentage Accuracy?

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.

Derivation?

  1. Split input into 5 regimes
  2. if B < -3.4500000000000001e140

    1. Initial program 0.2%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified0.2%

      \[\leadsto \color{blue}{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \]
      Step-by-step derivation

      [Start]0.2

      \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Taylor expanded in B around -inf 0.2%

      \[\leadsto \frac{-\sqrt{\color{blue}{2 \cdot \left(F \cdot {B}^{3}\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    4. Simplified0.2%

      \[\leadsto \frac{-\sqrt{\color{blue}{\left(2 \cdot F\right) \cdot {B}^{3}}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      Step-by-step derivation

      [Start]0.2

      \[ \frac{-\sqrt{2 \cdot \left(F \cdot {B}^{3}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      associate-*r* [=>]0.2

      \[ \frac{-\sqrt{\color{blue}{\left(2 \cdot F\right) \cdot {B}^{3}}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    5. Taylor expanded in A around 0 50.7%

      \[\leadsto \color{blue}{-1 \cdot \left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right)} \]
    6. Simplified50.7%

      \[\leadsto \color{blue}{\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)} \]
      Step-by-step derivation

      [Start]50.7

      \[ -1 \cdot \left(\sqrt{2} \cdot \sqrt{\frac{F}{B}}\right) \]

      mul-1-neg [=>]50.7

      \[ \color{blue}{-\sqrt{2} \cdot \sqrt{\frac{F}{B}}} \]

      *-commutative [=>]50.7

      \[ -\color{blue}{\sqrt{\frac{F}{B}} \cdot \sqrt{2}} \]

      distribute-rgt-neg-in [=>]50.7

      \[ \color{blue}{\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)} \]

    if -3.4500000000000001e140 < B < -1.9000000000000002e-37

    1. Initial program 37.8%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified38.3%

      \[\leadsto \color{blue}{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \]
      Step-by-step derivation

      [Start]37.8

      \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Applied egg-rr58.0%

      \[\leadsto \frac{-\color{blue}{\sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      Step-by-step derivation

      [Start]38.3

      \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      associate-*r* [=>]52.4

      \[ \frac{-\sqrt{\color{blue}{\left(F \cdot \left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      sqrt-prod [=>]58.8

      \[ \frac{-\color{blue}{\sqrt{F \cdot \left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right)} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      associate--r- [=>]58.0

      \[ \frac{-\sqrt{F \cdot \color{blue}{\left(\left(A - \mathsf{hypot}\left(B, A - C\right)\right) + C\right)}} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      +-commutative [=>]58.0

      \[ \frac{-\sqrt{F \cdot \color{blue}{\left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)}} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      *-commutative [=>]58.0

      \[ \frac{-\sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, \color{blue}{\left(B \cdot B\right) \cdot 2}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      associate-*l* [=>]58.0

      \[ \frac{-\sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, \color{blue}{B \cdot \left(B \cdot 2\right)}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    4. Simplified58.0%

      \[\leadsto \frac{-\color{blue}{\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(2 \cdot B\right)\right)} \cdot \sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      Step-by-step derivation

      [Start]58.0

      \[ \frac{-\sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      unpow1/2 [<=]58.0

      \[ \frac{-\color{blue}{{\left(F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}^{0.5}} \cdot \sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      *-commutative [=>]58.0

      \[ \frac{-\color{blue}{\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot {\left(F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}^{0.5}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      *-commutative [=>]58.0

      \[ \frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \color{blue}{\left(2 \cdot B\right)}\right)} \cdot {\left(F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)\right)}^{0.5}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      unpow1/2 [=>]58.0

      \[ \frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(2 \cdot B\right)\right)} \cdot \color{blue}{\sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

    if -1.9000000000000002e-37 < B < 1.9999999999999999e-81

    1. Initial program 18.6%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified24.5%

      \[\leadsto \color{blue}{\frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(C - \left(\mathsf{hypot}\left(B, A - C\right) - A\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)}} \]
      Step-by-step derivation

      [Start]18.6

      \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Taylor expanded in C around inf 22.1%

      \[\leadsto \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \color{blue}{\left(A - -1 \cdot A\right)}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]
    4. Simplified22.1%

      \[\leadsto \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \color{blue}{\left(A + A\right)}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]
      Step-by-step derivation

      [Start]22.1

      \[ \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(A - -1 \cdot A\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]

      cancel-sign-sub-inv [=>]22.1

      \[ \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \color{blue}{\left(A + \left(--1\right) \cdot A\right)}\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]

      metadata-eval [=>]22.1

      \[ \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(A + \color{blue}{1} \cdot A\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]

      *-lft-identity [=>]22.1

      \[ \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right) \cdot \left(\left(2 \cdot F\right) \cdot \left(A + \color{blue}{A}\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]

    if 1.9999999999999999e-81 < B < 8.2e14

    1. Initial program 26.8%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified28.6%

      \[\leadsto \color{blue}{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \]
      Step-by-step derivation

      [Start]26.8

      \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Taylor expanded in C around inf 22.3%

      \[\leadsto \frac{-\sqrt{F \cdot \left(\left(A - \color{blue}{\left(0.5 \cdot \frac{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}{C} + -1 \cdot A\right)}\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    4. Simplified22.4%

      \[\leadsto \frac{-\sqrt{F \cdot \left(\left(A - \color{blue}{\left(0.5 \cdot \frac{B \cdot B + \left(A \cdot A - A \cdot A\right)}{C} - A\right)}\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
      Step-by-step derivation

      [Start]22.3

      \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(0.5 \cdot \frac{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}{C} + -1 \cdot A\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      mul-1-neg [=>]22.3

      \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(0.5 \cdot \frac{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}{C} + \color{blue}{\left(-A\right)}\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      unsub-neg [=>]22.3

      \[ \frac{-\sqrt{F \cdot \left(\left(A - \color{blue}{\left(0.5 \cdot \frac{\left({B}^{2} + {A}^{2}\right) - {\left(-1 \cdot A\right)}^{2}}{C} - A\right)}\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      associate--l+ [=>]22.4

      \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(0.5 \cdot \frac{\color{blue}{{B}^{2} + \left({A}^{2} - {\left(-1 \cdot A\right)}^{2}\right)}}{C} - A\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      unpow2 [=>]22.4

      \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(0.5 \cdot \frac{\color{blue}{B \cdot B} + \left({A}^{2} - {\left(-1 \cdot A\right)}^{2}\right)}{C} - A\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      unpow2 [=>]22.4

      \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(0.5 \cdot \frac{B \cdot B + \left(\color{blue}{A \cdot A} - {\left(-1 \cdot A\right)}^{2}\right)}{C} - A\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      unpow2 [=>]22.4

      \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(0.5 \cdot \frac{B \cdot B + \left(A \cdot A - \color{blue}{\left(-1 \cdot A\right) \cdot \left(-1 \cdot A\right)}\right)}{C} - A\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      mul-1-neg [=>]22.4

      \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(0.5 \cdot \frac{B \cdot B + \left(A \cdot A - \color{blue}{\left(-A\right)} \cdot \left(-1 \cdot A\right)\right)}{C} - A\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      mul-1-neg [=>]22.4

      \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(0.5 \cdot \frac{B \cdot B + \left(A \cdot A - \left(-A\right) \cdot \color{blue}{\left(-A\right)}\right)}{C} - A\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      sqr-neg [=>]22.4

      \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(0.5 \cdot \frac{B \cdot B + \left(A \cdot A - \color{blue}{A \cdot A}\right)}{C} - A\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    5. Applied egg-rr22.8%

      \[\leadsto \color{blue}{0 - \frac{\sqrt{F \cdot \left(\left(\left(A - 0.5 \cdot \frac{B \cdot B}{C}\right) + A\right) \cdot \mathsf{fma}\left(C, A \cdot -8, \left(B \cdot B\right) \cdot 2\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \]
      Step-by-step derivation

      [Start]22.4

      \[ \frac{-\sqrt{F \cdot \left(\left(A - \left(0.5 \cdot \frac{B \cdot B + \left(A \cdot A - A \cdot A\right)}{C} - A\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      distribute-frac-neg [=>]22.4

      \[ \color{blue}{-\frac{\sqrt{F \cdot \left(\left(A - \left(0.5 \cdot \frac{B \cdot B + \left(A \cdot A - A \cdot A\right)}{C} - A\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \]

      neg-sub0 [=>]22.4

      \[ \color{blue}{0 - \frac{\sqrt{F \cdot \left(\left(A - \left(0.5 \cdot \frac{B \cdot B + \left(A \cdot A - A \cdot A\right)}{C} - A\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \]
    6. Simplified22.8%

      \[\leadsto \color{blue}{\frac{\sqrt{\left(A + \left(A + \frac{B \cdot B}{C} \cdot -0.5\right)\right) \cdot \left(\mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right) \cdot F\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)}} \]
      Step-by-step derivation

      [Start]22.8

      \[ 0 - \frac{\sqrt{F \cdot \left(\left(\left(A - 0.5 \cdot \frac{B \cdot B}{C}\right) + A\right) \cdot \mathsf{fma}\left(C, A \cdot -8, \left(B \cdot B\right) \cdot 2\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      neg-sub0 [<=]22.8

      \[ \color{blue}{-\frac{\sqrt{F \cdot \left(\left(\left(A - 0.5 \cdot \frac{B \cdot B}{C}\right) + A\right) \cdot \mathsf{fma}\left(C, A \cdot -8, \left(B \cdot B\right) \cdot 2\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \]

      neg-mul-1 [=>]22.8

      \[ \color{blue}{-1 \cdot \frac{\sqrt{F \cdot \left(\left(\left(A - 0.5 \cdot \frac{B \cdot B}{C}\right) + A\right) \cdot \mathsf{fma}\left(C, A \cdot -8, \left(B \cdot B\right) \cdot 2\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \]

      metadata-eval [<=]22.8

      \[ \color{blue}{\frac{1}{-1}} \cdot \frac{\sqrt{F \cdot \left(\left(\left(A - 0.5 \cdot \frac{B \cdot B}{C}\right) + A\right) \cdot \mathsf{fma}\left(C, A \cdot -8, \left(B \cdot B\right) \cdot 2\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]

      times-frac [<=]22.8

      \[ \color{blue}{\frac{1 \cdot \sqrt{F \cdot \left(\left(\left(A - 0.5 \cdot \frac{B \cdot B}{C}\right) + A\right) \cdot \mathsf{fma}\left(C, A \cdot -8, \left(B \cdot B\right) \cdot 2\right)\right)}}{-1 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \]

      neg-mul-1 [<=]22.8

      \[ \frac{1 \cdot \sqrt{F \cdot \left(\left(\left(A - 0.5 \cdot \frac{B \cdot B}{C}\right) + A\right) \cdot \mathsf{fma}\left(C, A \cdot -8, \left(B \cdot B\right) \cdot 2\right)\right)}}{\color{blue}{-\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \]
    7. Applied egg-rr22.8%

      \[\leadsto \frac{\sqrt{\left(A + \left(A + \frac{B \cdot B}{C} \cdot -0.5\right)\right) \cdot \color{blue}{\left(\left(C \cdot \left(A \cdot -8\right)\right) \cdot F + \left(B \cdot \left(B \cdot 2\right)\right) \cdot F\right)}}}{-\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)} \]
      Step-by-step derivation

      [Start]22.8

      \[ \frac{\sqrt{\left(A + \left(A + \frac{B \cdot B}{C} \cdot -0.5\right)\right) \cdot \left(\mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right) \cdot F\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)} \]

      *-commutative [=>]22.8

      \[ \frac{\sqrt{\left(A + \left(A + \frac{B \cdot B}{C} \cdot -0.5\right)\right) \cdot \color{blue}{\left(F \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}}{-\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)} \]

      fma-udef [=>]22.8

      \[ \frac{\sqrt{\left(A + \left(A + \frac{B \cdot B}{C} \cdot -0.5\right)\right) \cdot \left(F \cdot \color{blue}{\left(C \cdot \left(A \cdot -8\right) + 2 \cdot \left(B \cdot B\right)\right)}\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)} \]

      distribute-rgt-in [=>]22.8

      \[ \frac{\sqrt{\left(A + \left(A + \frac{B \cdot B}{C} \cdot -0.5\right)\right) \cdot \color{blue}{\left(\left(C \cdot \left(A \cdot -8\right)\right) \cdot F + \left(2 \cdot \left(B \cdot B\right)\right) \cdot F\right)}}}{-\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)} \]

      *-commutative [=>]22.8

      \[ \frac{\sqrt{\left(A + \left(A + \frac{B \cdot B}{C} \cdot -0.5\right)\right) \cdot \left(\left(C \cdot \left(A \cdot -8\right)\right) \cdot F + \color{blue}{\left(\left(B \cdot B\right) \cdot 2\right)} \cdot F\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)} \]

      associate-*l* [=>]22.8

      \[ \frac{\sqrt{\left(A + \left(A + \frac{B \cdot B}{C} \cdot -0.5\right)\right) \cdot \left(\left(C \cdot \left(A \cdot -8\right)\right) \cdot F + \color{blue}{\left(B \cdot \left(B \cdot 2\right)\right)} \cdot F\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)} \]
    8. Taylor expanded in B around 0 22.8%

      \[\leadsto \frac{\sqrt{\left(A + \left(A + \color{blue}{\frac{{B}^{2}}{C}} \cdot -0.5\right)\right) \cdot \left(\left(C \cdot \left(A \cdot -8\right)\right) \cdot F + \left(B \cdot \left(B \cdot 2\right)\right) \cdot F\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)} \]
    9. Simplified22.8%

      \[\leadsto \frac{\sqrt{\left(A + \left(A + \color{blue}{\frac{B}{\frac{C}{B}}} \cdot -0.5\right)\right) \cdot \left(\left(C \cdot \left(A \cdot -8\right)\right) \cdot F + \left(B \cdot \left(B \cdot 2\right)\right) \cdot F\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)} \]
      Step-by-step derivation

      [Start]22.8

      \[ \frac{\sqrt{\left(A + \left(A + \frac{{B}^{2}}{C} \cdot -0.5\right)\right) \cdot \left(\left(C \cdot \left(A \cdot -8\right)\right) \cdot F + \left(B \cdot \left(B \cdot 2\right)\right) \cdot F\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)} \]

      unpow2 [=>]22.8

      \[ \frac{\sqrt{\left(A + \left(A + \frac{\color{blue}{B \cdot B}}{C} \cdot -0.5\right)\right) \cdot \left(\left(C \cdot \left(A \cdot -8\right)\right) \cdot F + \left(B \cdot \left(B \cdot 2\right)\right) \cdot F\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)} \]

      associate-/l* [=>]22.8

      \[ \frac{\sqrt{\left(A + \left(A + \color{blue}{\frac{B}{\frac{C}{B}}} \cdot -0.5\right)\right) \cdot \left(\left(C \cdot \left(A \cdot -8\right)\right) \cdot F + \left(B \cdot \left(B \cdot 2\right)\right) \cdot F\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(-4 \cdot A\right)\right)} \]

    if 8.2e14 < B

    1. Initial program 11.5%

      \[\frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    2. Simplified10.2%

      \[\leadsto \color{blue}{\frac{-\sqrt{F \cdot \left(\left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right) \cdot \mathsf{fma}\left(C, A \cdot -8, 2 \cdot \left(B \cdot B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}} \]
      Step-by-step derivation

      [Start]11.5

      \[ \frac{-\sqrt{\left(2 \cdot \left(\left({B}^{2} - \left(4 \cdot A\right) \cdot C\right) \cdot F\right)\right) \cdot \left(\left(A + C\right) - \sqrt{{\left(A - C\right)}^{2} + {B}^{2}}\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \]
    3. Taylor expanded in C around 0 14.5%

      \[\leadsto \color{blue}{-1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right)} \]
    4. Simplified47.2%

      \[\leadsto \color{blue}{\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}\right)} \]
      Step-by-step derivation

      [Start]14.5

      \[ -1 \cdot \left(\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right) \]

      mul-1-neg [=>]14.5

      \[ \color{blue}{-\frac{\sqrt{2}}{B} \cdot \sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}} \]

      distribute-rgt-neg-in [=>]14.5

      \[ \color{blue}{\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{\left(A - \sqrt{{B}^{2} + {A}^{2}}\right) \cdot F}\right)} \]

      *-commutative [=>]14.5

      \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{\color{blue}{F \cdot \left(A - \sqrt{{B}^{2} + {A}^{2}}\right)}}\right) \]

      unpow2 [=>]14.5

      \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \sqrt{\color{blue}{B \cdot B} + {A}^{2}}\right)}\right) \]

      unpow2 [=>]14.5

      \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \sqrt{B \cdot B + \color{blue}{A \cdot A}}\right)}\right) \]

      hypot-def [=>]47.2

      \[ \frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \color{blue}{\mathsf{hypot}\left(B, A\right)}\right)}\right) \]
  3. Recombined 5 regimes into one program.
  4. Final simplification37.0%

    \[\leadsto \begin{array}{l} \mathbf{if}\;B \leq -3.45 \cdot 10^{+140}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{elif}\;B \leq -1.9 \cdot 10^{-37}:\\ \;\;\;\;\frac{-\sqrt{\mathsf{fma}\left(C, A \cdot -8, B \cdot \left(B \cdot 2\right)\right)} \cdot \sqrt{F \cdot \left(C + \left(A - \mathsf{hypot}\left(B, A - C\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{elif}\;B \leq 2 \cdot 10^{-81}:\\ \;\;\;\;\frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(\left(F \cdot 2\right) \cdot \left(A + A\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{elif}\;B \leq 8.2 \cdot 10^{+14}:\\ \;\;\;\;\frac{\sqrt{\left(A + \left(A + \frac{B}{\frac{C}{B}} \cdot -0.5\right)\right) \cdot \left(F \cdot \left(C \cdot \left(A \cdot -8\right)\right) + F \cdot \left(B \cdot \left(B \cdot 2\right)\right)\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}\right)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy45.8%
Cost20168
\[\begin{array}{l} \mathbf{if}\;B \leq -4.5 \cdot 10^{+43}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{elif}\;B \leq 1.16 \cdot 10^{+16}:\\ \;\;\;\;\frac{\sqrt{\left(F \cdot \left(C \cdot \left(A \cdot -8\right)\right) + F \cdot \left(B \cdot \left(B \cdot 2\right)\right)\right) \cdot \left(A + \left(A + -0.5 \cdot \frac{B \cdot B}{C}\right)\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}\right)\\ \end{array} \]
Alternative 2
Accuracy36.6%
Cost15368
\[\begin{array}{l} \mathbf{if}\;B \leq -1.15 \cdot 10^{+43}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{elif}\;B \leq 4.4 \cdot 10^{+69}:\\ \;\;\;\;\frac{\sqrt{\left(A + \left(A + \frac{B}{\frac{C}{B}} \cdot -0.5\right)\right) \cdot \left(F \cdot \left(C \cdot \left(A \cdot -8\right)\right) + F \cdot \left(B \cdot \left(B \cdot 2\right)\right)\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot \sqrt{F \cdot A}\right) \cdot \frac{1}{B}\\ \end{array} \]
Alternative 3
Accuracy36.6%
Cost15368
\[\begin{array}{l} \mathbf{if}\;B \leq -2.06 \cdot 10^{+43}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{elif}\;B \leq 6 \cdot 10^{+65}:\\ \;\;\;\;\frac{\sqrt{\left(F \cdot \left(C \cdot \left(A \cdot -8\right)\right) + F \cdot \left(B \cdot \left(B \cdot 2\right)\right)\right) \cdot \left(A + \left(A + -0.5 \cdot \frac{B \cdot B}{C}\right)\right)}}{-\mathsf{fma}\left(B, B, C \cdot \left(A \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot \sqrt{F \cdot A}\right) \cdot \frac{1}{B}\\ \end{array} \]
Alternative 4
Accuracy38.4%
Cost14668
\[\begin{array}{l} t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\ t_1 := F \cdot \left(B \cdot B\right)\\ \mathbf{if}\;B \leq -3.9 \cdot 10^{+40}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{elif}\;B \leq 3.6 \cdot 10^{-19}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(A + A\right) \cdot \left(t_1 + F \cdot \left(-4 \cdot \left(C \cdot A\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 1.1 \cdot 10^{+128}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot \sqrt{F \cdot A}\right) \cdot \frac{1}{B}\\ \end{array} \]
Alternative 5
Accuracy36.9%
Cost13316
\[\begin{array}{l} \mathbf{if}\;B \leq -5.5 \cdot 10^{+39}:\\ \;\;\;\;\sqrt{\frac{F}{B}} \cdot \left(-\sqrt{2}\right)\\ \mathbf{elif}\;B \leq 1.55 \cdot 10^{+75}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(A + A\right) \cdot \left(F \cdot \left(B \cdot B\right) + F \cdot \left(-4 \cdot \left(C \cdot A\right)\right)\right)\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot \sqrt{F \cdot A}\right) \cdot \frac{1}{B}\\ \end{array} \]
Alternative 6
Accuracy29.2%
Cost8584
\[\begin{array}{l} t_0 := \sqrt{F \cdot A}\\ \mathbf{if}\;B \leq -1.4 \cdot 10^{+43}:\\ \;\;\;\;2 \cdot \frac{t_0}{B}\\ \mathbf{elif}\;B \leq 4.9 \cdot 10^{+86}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(A + A\right) \cdot \left(F \cdot \left(B \cdot B\right) + F \cdot \left(-4 \cdot \left(C \cdot A\right)\right)\right)\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot t_0\right) \cdot \frac{1}{B}\\ \end{array} \]
Alternative 7
Accuracy29.2%
Cost8456
\[\begin{array}{l} t_0 := B \cdot B - \left(C \cdot A\right) \cdot 4\\ t_1 := \sqrt{F \cdot A}\\ \mathbf{if}\;B \leq -1 \cdot 10^{+41}:\\ \;\;\;\;2 \cdot \frac{t_1}{B}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{+88}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(A + A\right) \cdot \left(F \cdot t_0\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot t_1\right) \cdot \frac{1}{B}\\ \end{array} \]
Alternative 8
Accuracy23.3%
Cost8200
\[\begin{array}{l} t_0 := \sqrt{F \cdot A}\\ \mathbf{if}\;B \leq -1.65 \cdot 10^{+33}:\\ \;\;\;\;2 \cdot \frac{t_0}{B}\\ \mathbf{elif}\;B \leq 0.345:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(A + A\right) \cdot \left(-4 \cdot \left(A \cdot \left(F \cdot C\right)\right)\right)\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot t_0\right) \cdot \frac{1}{B}\\ \end{array} \]
Alternative 9
Accuracy19.7%
Cost8072
\[\begin{array}{l} t_0 := \sqrt{F \cdot A}\\ \mathbf{if}\;B \leq -1.52 \cdot 10^{+30}:\\ \;\;\;\;2 \cdot \frac{t_0}{B}\\ \mathbf{elif}\;B \leq 57:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-8 \cdot \left(\left(F \cdot C\right) \cdot \left(A \cdot A\right)\right)\right)}}{B \cdot B - \left(C \cdot A\right) \cdot 4}\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot t_0\right) \cdot \frac{1}{B}\\ \end{array} \]
Alternative 10
Accuracy9.3%
Cost7108
\[\begin{array}{l} \mathbf{if}\;B \leq -4 \cdot 10^{-310}:\\ \;\;\;\;2 \cdot \frac{{\left(F \cdot A\right)}^{0.5}}{B}\\ \mathbf{else}:\\ \;\;\;\;\left(-2 \cdot \sqrt{F \cdot A}\right) \cdot \frac{1}{B}\\ \end{array} \]
Alternative 11
Accuracy5.5%
Cost6912
\[2 \cdot \frac{{\left(F \cdot A\right)}^{0.5}}{B} \]
Alternative 12
Accuracy5.4%
Cost6848
\[2 \cdot \frac{\sqrt{F \cdot A}}{B} \]

Error

Reproduce?

herbie shell --seed 2023159 
(FPCore (A B C F)
  :name "ABCF->ab-angle b"
  :precision binary64
  (/ (- (sqrt (* (* 2.0 (* (- (pow B 2.0) (* (* 4.0 A) C)) F)) (- (+ A C) (sqrt (+ (pow (- A C) 2.0) (pow B 2.0))))))) (- (pow B 2.0) (* (* 4.0 A) C))))