ABCF->ab-angle b

?

Percentage Accurate: 18.3% → 43.5%
Time: 56.1s
Precision: binary64
Cost: 141836

?

\[ \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 := \left(4 \cdot A\right) \cdot C\\ t_2 := \frac{-\sqrt{\left(\sqrt{{B}^{2} + {\left(A - C\right)}^{2}} - \left(A + C\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(t_1 - {B}^{2}\right)\right)\right)}}{{B}^{2} - t_1}\\ t_3 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{-191}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)} \cdot \left(-\sqrt{2 \cdot t_0}\right)}{t_3}\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;\frac{\sqrt{\left(A + \left(A - -0.5 \cdot \frac{\left(A \cdot A - A \cdot A\right) - B \cdot B}{C}\right)\right) \cdot \left(2 \cdot F\right)} \cdot \left(-\sqrt{t_0}\right)}{t_0}\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)\right)}}{t_3}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\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 (* (* 4.0 A) C))
        (t_2
         (/
          (-
           (sqrt
            (*
             (- (sqrt (+ (pow B 2.0) (pow (- A C) 2.0))) (+ A C))
             (* 2.0 (* F (- t_1 (pow B 2.0)))))))
          (- (pow B 2.0) t_1)))
        (t_3 (- (* B B) (* 4.0 (* A C)))))
   (if (<= t_2 -1e-191)
     (/ (* (sqrt (* F (- A (hypot B A)))) (- (sqrt (* 2.0 t_0)))) t_3)
     (if (<= t_2 0.0)
       (/
        (*
         (sqrt
          (*
           (+ A (- A (* -0.5 (/ (- (- (* A A) (* A A)) (* B B)) C))))
           (* 2.0 F)))
         (- (sqrt t_0)))
        t_0)
       (if (<= t_2 INFINITY)
         (/
          (- (sqrt (* 2.0 (* 2.0 (* A (* F (+ (* B B) (* -4.0 (* A C)))))))))
          t_3)
         (* (/ (sqrt 2.0) B) (- (sqrt (* F (- A (hypot A B)))))))))))
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 = (4.0 * A) * C;
	double t_2 = -sqrt(((sqrt((pow(B, 2.0) + pow((A - C), 2.0))) - (A + C)) * (2.0 * (F * (t_1 - pow(B, 2.0)))))) / (pow(B, 2.0) - t_1);
	double t_3 = (B * B) - (4.0 * (A * C));
	double tmp;
	if (t_2 <= -1e-191) {
		tmp = (sqrt((F * (A - hypot(B, A)))) * -sqrt((2.0 * t_0))) / t_3;
	} else if (t_2 <= 0.0) {
		tmp = (sqrt(((A + (A - (-0.5 * ((((A * A) - (A * A)) - (B * B)) / C)))) * (2.0 * F))) * -sqrt(t_0)) / t_0;
	} else if (t_2 <= ((double) INFINITY)) {
		tmp = -sqrt((2.0 * (2.0 * (A * (F * ((B * B) + (-4.0 * (A * C)))))))) / t_3;
	} else {
		tmp = (sqrt(2.0) / B) * -sqrt((F * (A - hypot(A, B))));
	}
	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(Float64(4.0 * A) * C)
	t_2 = Float64(Float64(-sqrt(Float64(Float64(sqrt(Float64((B ^ 2.0) + (Float64(A - C) ^ 2.0))) - Float64(A + C)) * Float64(2.0 * Float64(F * Float64(t_1 - (B ^ 2.0))))))) / Float64((B ^ 2.0) - t_1))
	t_3 = Float64(Float64(B * B) - Float64(4.0 * Float64(A * C)))
	tmp = 0.0
	if (t_2 <= -1e-191)
		tmp = Float64(Float64(sqrt(Float64(F * Float64(A - hypot(B, A)))) * Float64(-sqrt(Float64(2.0 * t_0)))) / t_3);
	elseif (t_2 <= 0.0)
		tmp = Float64(Float64(sqrt(Float64(Float64(A + Float64(A - Float64(-0.5 * Float64(Float64(Float64(Float64(A * A) - Float64(A * A)) - Float64(B * B)) / C)))) * Float64(2.0 * F))) * Float64(-sqrt(t_0))) / t_0);
	elseif (t_2 <= Inf)
		tmp = Float64(Float64(-sqrt(Float64(2.0 * Float64(2.0 * Float64(A * Float64(F * Float64(Float64(B * B) + Float64(-4.0 * Float64(A * C))))))))) / t_3);
	else
		tmp = Float64(Float64(sqrt(2.0) / B) * Float64(-sqrt(Float64(F * Float64(A - hypot(A, B))))));
	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[(N[(4.0 * A), $MachinePrecision] * C), $MachinePrecision]}, Block[{t$95$2 = N[((-N[Sqrt[N[(N[(N[Sqrt[N[(N[Power[B, 2.0], $MachinePrecision] + N[Power[N[(A - C), $MachinePrecision], 2.0], $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - N[(A + C), $MachinePrecision]), $MachinePrecision] * N[(2.0 * N[(F * N[(t$95$1 - N[Power[B, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / N[(N[Power[B, 2.0], $MachinePrecision] - t$95$1), $MachinePrecision]), $MachinePrecision]}, Block[{t$95$3 = N[(N[(B * B), $MachinePrecision] - N[(4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]}, If[LessEqual[t$95$2, -1e-191], N[(N[(N[Sqrt[N[(F * N[(A - N[Sqrt[B ^ 2 + A ^ 2], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[N[(2.0 * t$95$0), $MachinePrecision]], $MachinePrecision])), $MachinePrecision] / t$95$3), $MachinePrecision], If[LessEqual[t$95$2, 0.0], N[(N[(N[Sqrt[N[(N[(A + N[(A - N[(-0.5 * N[(N[(N[(N[(A * A), $MachinePrecision] - N[(A * A), $MachinePrecision]), $MachinePrecision] - N[(B * B), $MachinePrecision]), $MachinePrecision] / C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * N[(2.0 * F), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] * (-N[Sqrt[t$95$0], $MachinePrecision])), $MachinePrecision] / t$95$0), $MachinePrecision], If[LessEqual[t$95$2, Infinity], N[((-N[Sqrt[N[(2.0 * N[(2.0 * N[(A * N[(F * N[(N[(B * B), $MachinePrecision] + N[(-4.0 * N[(A * C), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]) / t$95$3), $MachinePrecision], N[(N[(N[Sqrt[2.0], $MachinePrecision] / B), $MachinePrecision] * (-N[Sqrt[N[(F * N[(A - N[Sqrt[A ^ 2 + B ^ 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 := \left(4 \cdot A\right) \cdot C\\
t_2 := \frac{-\sqrt{\left(\sqrt{{B}^{2} + {\left(A - C\right)}^{2}} - \left(A + C\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(t_1 - {B}^{2}\right)\right)\right)}}{{B}^{2} - t_1}\\
t_3 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\
\mathbf{if}\;t_2 \leq -1 \cdot 10^{-191}:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)} \cdot \left(-\sqrt{2 \cdot t_0}\right)}{t_3}\\

\mathbf{elif}\;t_2 \leq 0:\\
\;\;\;\;\frac{\sqrt{\left(A + \left(A - -0.5 \cdot \frac{\left(A \cdot A - A \cdot A\right) - B \cdot B}{C}\right)\right) \cdot \left(2 \cdot F\right)} \cdot \left(-\sqrt{t_0}\right)}{t_0}\\

\mathbf{elif}\;t_2 \leq \infty:\\
\;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)\right)}}{t_3}\\

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


\end{array}

Local Percentage Accuracy vs ?

The average percentage accuracy by input value. Horizontal axis shows value of an input variable; the variable is choosen in the title. Vertical axis is accuracy; higher is better. Red represent the original program, while blue represents Herbie's suggestion. These can be toggled with buttons below the plot. The line is an average while dots represent individual samples.

Herbie found 22 alternatives:

AlternativeAccuracySpeedup

Accuracy vs Speed

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.

Bogosity?

Bogosity

Derivation?

  1. Split input into 4 regimes
  2. if (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -1e-191

    1. Initial program 43.4%

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

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

      [Start]43.4%

      \[ \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 34.7%

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

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

      [Start]34.7%

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

      +-commutative [=>]34.7%

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

      unpow2 [=>]34.7%

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

      unpow2 [=>]34.7%

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

      hypot-def [=>]37.1%

      \[ \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \left(A - \color{blue}{\mathsf{hypot}\left(A, B\right)}\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    5. Applied egg-rr38.3%

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

      [Start]37.1%

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

      *-un-lft-identity [=>]37.1%

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

      associate-*l* [=>]38.3%

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

      cancel-sign-sub-inv [=>]38.3%

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

      metadata-eval [=>]38.3%

      \[ \frac{-1 \cdot \sqrt{2 \cdot \left(\left(B \cdot B + \color{blue}{-4} \cdot \left(A \cdot C\right)\right) \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    6. Simplified38.3%

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

      [Start]38.3%

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

      *-lft-identity [=>]38.3%

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

      associate-*r* [=>]38.3%

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

      fma-def [=>]38.3%

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

      *-commutative [=>]38.3%

      \[ \frac{-\sqrt{\left(2 \cdot \mathsf{fma}\left(B, B, \color{blue}{\left(A \cdot C\right) \cdot -4}\right)\right) \cdot \left(F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    7. Applied egg-rr47.9%

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

      [Start]38.3%

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

      sqrt-prod [=>]47.9%

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

      associate-*l* [=>]47.9%

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

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

      [Start]47.9%

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

      *-commutative [=>]47.9%

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

      hypot-def [<=]43.4%

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

      unpow2 [<=]43.4%

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

      unpow2 [<=]43.4%

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

      +-commutative [<=]43.4%

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

      unpow2 [=>]43.4%

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

      unpow2 [=>]43.4%

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

      hypot-def [=>]47.9%

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

    if -1e-191 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < -0.0

    1. Initial program 3.4%

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

      \[\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]3.4%

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

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

      [Start]4.7%

      \[ \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)} \]

      sqrt-prod [=>]17.8%

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

      *-commutative [<=]17.8%

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

      associate--r- [=>]17.2%

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

      +-commutative [<=]17.2%

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

      *-commutative [=>]17.2%

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

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

      [Start]17.2%

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

      hypot-def [<=]17.2%

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

      unpow2 [<=]17.2%

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

      unpow2 [<=]17.2%

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

      +-commutative [<=]17.2%

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

      unpow2 [=>]17.2%

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

      unpow2 [=>]17.2%

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

      hypot-def [=>]17.2%

      \[ \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \cdot \sqrt{\left(A + \left(C - \color{blue}{\mathsf{hypot}\left(A - C, B\right)}\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]
    5. Taylor expanded in C around inf 19.2%

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

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

      [Start]19.2%

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

      associate--l+ [=>]17.1%

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

      unpow2 [=>]17.1%

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

      unpow2 [=>]17.1%

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

      unpow2 [=>]17.1%

      \[ \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \cdot \sqrt{\left(A + \left(A + -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}\right)\right) \cdot \left(2 \cdot F\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(-4 \cdot C\right)\right)} \]

      mul-1-neg [=>]17.1%

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

      mul-1-neg [=>]17.1%

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

      sqr-neg [=>]17.1%

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

    if -0.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C))) < +inf.0

    1. Initial program 32.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. Simplified32.6%

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

      [Start]32.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 A around -inf 28.2%

      \[\leadsto \frac{-\sqrt{2 \cdot \left(\left(\left(B \cdot B - 4 \cdot \left(A \cdot C\right)\right) \cdot F\right) \cdot \color{blue}{\left(2 \cdot A\right)}\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
    4. Taylor expanded in F around 0 28.2%

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

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

      [Start]28.2%

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

      cancel-sign-sub-inv [=>]28.2%

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

      metadata-eval [=>]28.2%

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

      unpow2 [=>]28.2%

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

    if +inf.0 < (/.f64 (neg.f64 (sqrt.f64 (*.f64 (*.f64 2 (*.f64 (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)) F)) (-.f64 (+.f64 A C) (sqrt.f64 (+.f64 (pow.f64 (-.f64 A C) 2) (pow.f64 B 2))))))) (-.f64 (pow.f64 B 2) (*.f64 (*.f64 4 A) C)))

    1. Initial program 0.0%

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

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

      [Start]0.0%

      \[ \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 1.8%

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

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

      [Start]1.8%

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

      mul-1-neg [=>]1.8%

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

      +-commutative [=>]1.8%

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

      unpow2 [=>]1.8%

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

      unpow2 [=>]1.8%

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

      hypot-def [=>]17.4%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;\frac{-\sqrt{\left(\sqrt{{B}^{2} + {\left(A - C\right)}^{2}} - \left(A + C\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(\left(4 \cdot A\right) \cdot C - {B}^{2}\right)\right)\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq -1 \cdot 10^{-191}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)} \cdot \left(-\sqrt{2 \cdot \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;\frac{-\sqrt{\left(\sqrt{{B}^{2} + {\left(A - C\right)}^{2}} - \left(A + C\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(\left(4 \cdot A\right) \cdot C - {B}^{2}\right)\right)\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq 0:\\ \;\;\;\;\frac{\sqrt{\left(A + \left(A - -0.5 \cdot \frac{\left(A \cdot A - A \cdot A\right) - B \cdot B}{C}\right)\right) \cdot \left(2 \cdot F\right)} \cdot \left(-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\right)}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{elif}\;\frac{-\sqrt{\left(\sqrt{{B}^{2} + {\left(A - C\right)}^{2}} - \left(A + C\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(\left(4 \cdot A\right) \cdot C - {B}^{2}\right)\right)\right)}}{{B}^{2} - \left(4 \cdot A\right) \cdot C} \leq \infty:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)}\right)\\ \end{array} \]

Alternatives

Alternative 1
Accuracy43.5%
Cost141836
\[\begin{array}{l} t_0 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_1 := \left(4 \cdot A\right) \cdot C\\ t_2 := \frac{-\sqrt{\left(\sqrt{{B}^{2} + {\left(A - C\right)}^{2}} - \left(A + C\right)\right) \cdot \left(2 \cdot \left(F \cdot \left(t_1 - {B}^{2}\right)\right)\right)}}{{B}^{2} - t_1}\\ t_3 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;t_2 \leq -1 \cdot 10^{-191}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)} \cdot \left(-\sqrt{2 \cdot t_0}\right)}{t_3}\\ \mathbf{elif}\;t_2 \leq 0:\\ \;\;\;\;\frac{\sqrt{\left(A + \left(A - -0.5 \cdot \frac{\left(A \cdot A - A \cdot A\right) - B \cdot B}{C}\right)\right) \cdot \left(2 \cdot F\right)} \cdot \left(-\sqrt{t_0}\right)}{t_0}\\ \mathbf{elif}\;t_2 \leq \infty:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)\right)}}{t_3}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)}\right)\\ \end{array} \]
Alternative 2
Accuracy37.4%
Cost28624
\[\begin{array}{l} t_0 := 4 \cdot \left(A \cdot C\right)\\ t_1 := B \cdot B - t_0\\ t_2 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_3 := \frac{\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)} \cdot \left(-\sqrt{2 \cdot t_2}\right)}{t_1}\\ \mathbf{if}\;C \leq -9.2 \cdot 10^{-172}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_2 \cdot \left(F \cdot \left(2 \cdot A\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;C \leq -3.2 \cdot 10^{-248}:\\ \;\;\;\;t_3\\ \mathbf{elif}\;C \leq 1.1 \cdot 10^{-297}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\mathsf{hypot}\left(A, B\right) - A\right) \cdot \left(F \cdot \left(t_0 - B \cdot B\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;C \leq 9.5 \cdot 10^{+40}:\\ \;\;\;\;t_3\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{F \cdot \left(\left(A - \mathsf{fma}\left(0.5, \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)}}{t_2}\\ \end{array} \]
Alternative 3
Accuracy35.9%
Cost27724
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -6.5 \cdot 10^{+18}:\\ \;\;\;\;\frac{B \cdot \sqrt{\left(2 \cdot F\right) \cdot \left(A + \left(C - \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq -7.2 \cdot 10^{-50}:\\ \;\;\;\;\sqrt{-0.5 \cdot \frac{B \cdot \left(B \cdot F\right)}{C}} \cdot \frac{-\sqrt{2}}{B}\\ \mathbf{elif}\;B \leq 3.4 \cdot 10^{-287}:\\ \;\;\;\;\frac{\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)} \cdot \left(-\sqrt{2 \cdot t_1}\right)}{t_0}\\ \mathbf{elif}\;B \leq 2.2 \cdot 10^{-18}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)}\right)\\ \end{array} \]
Alternative 4
Accuracy39.3%
Cost20740
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -3.2 \cdot 10^{+18}:\\ \;\;\;\;\frac{B \cdot \sqrt{\left(2 \cdot F\right) \cdot \left(A + \left(C - \mathsf{hypot}\left(A - C, B\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{elif}\;B \leq -2.8 \cdot 10^{-47}:\\ \;\;\;\;\sqrt{-0.5 \cdot \frac{B \cdot \left(B \cdot F\right)}{C}} \cdot \frac{-\sqrt{2}}{B}\\ \mathbf{elif}\;B \leq -1.55 \cdot 10^{-88}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_0 \cdot \left(F \cdot \left(A - \left(\mathsf{hypot}\left(B, A - C\right) - C\right)\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{-20}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot t_0\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(A, B\right)\right)}\right)\\ \end{array} \]
Alternative 5
Accuracy35.8%
Cost14788
\[\begin{array}{l} t_0 := 4 \cdot \left(A \cdot C\right)\\ t_1 := B \cdot B - t_0\\ \mathbf{if}\;C \leq 4800000:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\mathsf{hypot}\left(A, B\right) - A\right) \cdot \left(F \cdot \left(t_0 - B \cdot B\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(A + \left(A - -0.5 \cdot \frac{\left(A \cdot A - A \cdot A\right) - B \cdot B}{C}\right)\right) \cdot \left(F \cdot t_1\right)\right)}}{t_1}\\ \end{array} \]
Alternative 6
Accuracy35.1%
Cost14404
\[\begin{array}{l} t_0 := B \cdot \left(B \cdot F\right)\\ t_1 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -8.5 \cdot 10^{-8}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(A - \mathsf{hypot}\left(B, A\right)\right) \cdot t_0\right)}}{t_1}\\ \mathbf{elif}\;B \leq -2.8 \cdot 10^{-60}:\\ \;\;\;\;\sqrt{-0.5 \cdot \frac{t_0}{C}} \cdot \frac{-\sqrt{2}}{B}\\ \mathbf{elif}\;B \leq -4 \cdot 10^{-86}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_1\right) \cdot \left(A + \left(B + C\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 1.45 \cdot 10^{+44}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)\right)}}{t_1}\\ \mathbf{elif}\;B \leq 5.6 \cdot 10^{+96}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{\frac{F \cdot -0.5}{\frac{C}{B \cdot B}}}\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)}}{B}\\ \end{array} \]
Alternative 7
Accuracy34.8%
Cost13960
\[\begin{array}{l} \mathbf{if}\;B \leq 3.85 \cdot 10^{+43}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 1.3 \cdot 10^{+96}:\\ \;\;\;\;\sqrt{-0.5 \cdot \frac{B \cdot \left(B \cdot F\right)}{C}} \cdot \frac{-\sqrt{2}}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)}}{B}\\ \end{array} \]
Alternative 8
Accuracy35.1%
Cost13960
\[\begin{array}{l} \mathbf{if}\;B \leq 5.8 \cdot 10^{+43}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 1.8 \cdot 10^{+96}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{F \cdot \left(-0.5 \cdot \frac{B \cdot B}{C}\right)}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)}}{B}\\ \end{array} \]
Alternative 9
Accuracy35.0%
Cost13960
\[\begin{array}{l} \mathbf{if}\;B \leq 2.2 \cdot 10^{+45}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 1.5 \cdot 10^{+96}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{F \cdot \left(-0.5 \cdot \frac{B \cdot B}{C}\right)}\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)}}{B}\\ \end{array} \]
Alternative 10
Accuracy35.0%
Cost13960
\[\begin{array}{l} \mathbf{if}\;B \leq 7.8 \cdot 10^{+44}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{elif}\;B \leq 8 \cdot 10^{+96}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{\frac{F \cdot -0.5}{\frac{C}{B \cdot B}}}\right)}{B}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)}}{B}\\ \end{array} \]
Alternative 11
Accuracy34.6%
Cost13636
\[\begin{array}{l} \mathbf{if}\;B \leq 2.4 \cdot 10^{+90}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(2 \cdot F\right) \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)}}{B}\\ \end{array} \]
Alternative 12
Accuracy35.2%
Cost13508
\[\begin{array}{l} \mathbf{if}\;B \leq 3.05 \cdot 10^{+43}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \left(-\sqrt{-B \cdot F}\right)\\ \end{array} \]
Alternative 13
Accuracy35.2%
Cost13508
\[\begin{array}{l} \mathbf{if}\;B \leq 4.8 \cdot 10^{+43}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{\sqrt{2} \cdot \left(-\sqrt{-B \cdot F}\right)}{B}\\ \end{array} \]
Alternative 14
Accuracy29.9%
Cost9348
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ t_1 := F \cdot t_0\\ \mathbf{if}\;A \leq -1.65 \cdot 10^{-126}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(t_1 \cdot \left(2 \cdot A\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(A + \left(A - -0.5 \cdot \frac{\left(A \cdot A - A \cdot A\right) - B \cdot B}{C}\right)\right) \cdot t_1\right)}}{t_0}\\ \end{array} \]
Alternative 15
Accuracy22.6%
Cost8200
\[\begin{array}{l} t_0 := B \cdot B - 4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -2.8 \cdot 10^{-88}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(B \cdot \left(F \cdot t_0\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 4 \cdot 10^{-17}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot \left(-4 \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{{\left(A \cdot F\right)}^{0.5}}{B}\\ \end{array} \]
Alternative 16
Accuracy27.0%
Cost8192
\[\frac{-\sqrt{2 \cdot \left(2 \cdot \left(A \cdot \left(F \cdot \left(B \cdot B + -4 \cdot \left(A \cdot C\right)\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)} \]
Alternative 17
Accuracy22.1%
Cost8068
\[\begin{array}{l} \mathbf{if}\;B \leq 7 \cdot 10^{-17}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(2 \cdot A\right) \cdot \left(-4 \cdot \left(A \cdot \left(C \cdot F\right)\right)\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{{\left(A \cdot F\right)}^{0.5}}{B}\\ \end{array} \]
Alternative 18
Accuracy18.2%
Cost7940
\[\begin{array}{l} \mathbf{if}\;B \leq 4.8 \cdot 10^{-22}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(A \cdot A\right) \cdot -8\right) \cdot \left(C \cdot F\right)\right)}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{{\left(A \cdot F\right)}^{0.5}}{B}\\ \end{array} \]
Alternative 19
Accuracy18.2%
Cost7812
\[\begin{array}{l} \mathbf{if}\;B \leq 2.9 \cdot 10^{-16}:\\ \;\;\;\;\frac{-\sqrt{\left(\left(A \cdot A\right) \cdot \left(C \cdot F\right)\right) \cdot -16}}{B \cdot B - 4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{{\left(A \cdot F\right)}^{0.5}}{B}\\ \end{array} \]
Alternative 20
Accuracy8.9%
Cost7108
\[\begin{array}{l} \mathbf{if}\;B \leq -4 \cdot 10^{-309}:\\ \;\;\;\;2 \cdot \left(\sqrt{A \cdot F} \cdot \frac{1}{B}\right)\\ \mathbf{else}:\\ \;\;\;\;-2 \cdot \frac{{\left(A \cdot F\right)}^{0.5}}{B}\\ \end{array} \]
Alternative 21
Accuracy5.5%
Cost6912
\[-2 \cdot \frac{{\left(A \cdot F\right)}^{0.5}}{B} \]
Alternative 22
Accuracy5.4%
Cost6848
\[-2 \cdot \frac{\sqrt{A \cdot F}}{B} \]

Reproduce?

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