?

Average Error: 52.4 → 39.9
Time: 45.1s
Precision: binary64
Cost: 142412

?

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

\mathbf{elif}\;t_4 \leq 2 \cdot 10^{+278}:\\
\;\;\;\;\frac{-\sqrt{t_3 \cdot \left(\left(A + \left(A + \frac{{\left(-A\right)}^{2} - \left(B \cdot B + A \cdot A\right)}{C} \cdot 0.5\right)\right) \cdot \left(2 \cdot F\right)\right)}}{t_3}\\

\mathbf{elif}\;t_4 \leq \infty:\\
\;\;\;\;\frac{\sqrt{F \cdot \left(C \cdot \left(A + A\right)\right)} \cdot \left(-\sqrt{A \cdot -8}\right)}{t_3}\\

\mathbf{else}:\\
\;\;\;\;t_2 \cdot \frac{\sqrt{2}}{B}\\


\end{array}

Error?

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))) < -3.99999999999999978e-201

    1. Initial program 37.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. Simplified31.5

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

      [Start]37.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. Applied egg-rr21.2

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

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

      [Start]21.2

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

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

      associate-+l- [<=]21.3

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

      +-commutative [<=]21.3

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

      *-commutative [=>]21.3

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

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

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

      [Start]21.4

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

      associate-*l* [=>]21.4

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

      associate-*r/ [=>]21.3

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

      *-rgt-identity [=>]21.3

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

      associate-*r* [=>]21.3

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

      *-commutative [=>]21.3

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

      associate-*l* [=>]21.3

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

      *-commutative [<=]21.3

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

      associate-*r* [=>]21.3

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

      *-commutative [=>]21.3

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

      associate-*l* [=>]21.3

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

    if -3.99999999999999978e-201 < (/.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.99999999999999993e278

    1. Initial program 49.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. Simplified47.2

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

      [Start]49.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 inf 43.6

      \[\leadsto \frac{-\sqrt{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right) \cdot \left(\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)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    4. Simplified43.6

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

      [Start]43.6

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

      unpow2 [=>]43.6

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

      unpow2 [=>]43.6

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

      mul-1-neg [=>]43.6

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

    if 1.99999999999999993e278 < (/.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 63.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. Simplified44.2

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

      [Start]63.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 58.0

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

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

      [Start]58.0

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

      associate-*r* [=>]58.0

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

      *-commutative [=>]58.0

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

      *-commutative [=>]58.0

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

      mul-1-neg [=>]58.0

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

      \[\leadsto \frac{-\color{blue}{\sqrt{\left(F \cdot C\right) \cdot \left(A - \left(-A\right)\right)} \cdot \sqrt{-8 \cdot A}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)} \]
    6. Simplified41.5

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

      [Start]45.4

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

      associate-*l* [=>]41.5

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

      *-commutative [=>]41.5

      \[ \frac{-\sqrt{F \cdot \left(C \cdot \left(A - \left(-A\right)\right)\right)} \cdot \sqrt{\color{blue}{A \cdot -8}}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\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 64.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. Simplified63.2

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

      [Start]64.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. Applied egg-rr63.9

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

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

      [Start]63.9

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

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

      associate-+l- [<=]63.9

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

      +-commutative [<=]63.9

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

      *-commutative [=>]63.9

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

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

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

      [Start]63.9

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

      associate-*l* [=>]63.9

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

      associate-*r/ [=>]63.9

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

      *-rgt-identity [=>]63.9

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

      associate-*r* [=>]63.9

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

      *-commutative [=>]63.9

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

      associate-*l* [=>]63.9

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

      *-commutative [<=]63.9

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

      associate-*r* [=>]63.9

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

      *-commutative [=>]63.9

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

      associate-*l* [=>]63.9

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

      \[\leadsto \sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \color{blue}{\frac{\sqrt{2}}{B}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification39.9

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

Alternatives

Alternative 1
Error38.4
Cost27720
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -4.2 \cdot 10^{+60}:\\ \;\;\;\;\sqrt{F \cdot \left(A + \left(C - t_0\right)\right)} \cdot \frac{\sqrt{2}}{B}\\ \mathbf{elif}\;B \leq 4.5 \cdot 10^{+36}:\\ \;\;\;\;\frac{-\sqrt{-2 \cdot \left(t_1 \cdot \left(F \cdot \left(\left(t_0 - A\right) - C\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]
Alternative 2
Error38.4
Cost27720
\[\begin{array}{l} t_0 := \frac{\sqrt{2}}{B}\\ t_1 := A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\\ t_2 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -4.2 \cdot 10^{+60}:\\ \;\;\;\;\sqrt{F \cdot t_1} \cdot t_0\\ \mathbf{elif}\;B \leq 4.2 \cdot 10^{+37}:\\ \;\;\;\;\frac{-\sqrt{t_2 \cdot \left(t_1 \cdot \left(2 \cdot F\right)\right)}}{t_2}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(-\sqrt{F \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)}\right)\\ \end{array} \]
Alternative 3
Error41.0
Cost27540
\[\begin{array}{l} t_0 := \mathsf{hypot}\left(B, A - C\right)\\ t_1 := -\frac{\sqrt{\left(2 \cdot F\right) \cdot \left(\left(A + C\right) - t_0\right)}}{\mathsf{hypot}\left(B, \sqrt{C \cdot \left(A \cdot -4\right)}\right)}\\ t_2 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ t_3 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ t_4 := \frac{-\sqrt{t_3 \cdot \left(\left(2 \cdot F\right) \cdot \left(A + A\right)\right)}}{t_3}\\ \mathbf{if}\;B \leq -9.1 \cdot 10^{-20}:\\ \;\;\;\;\sqrt{F \cdot \left(A + \left(C - t_0\right)\right)} \cdot \frac{\sqrt{2}}{B}\\ \mathbf{elif}\;B \leq -2.15 \cdot 10^{-178}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;B \leq 1.75 \cdot 10^{-264}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 2.8 \cdot 10^{-116}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_3 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_3}\\ \mathbf{elif}\;B \leq 5.6 \cdot 10^{-69}:\\ \;\;\;\;t_1\\ \mathbf{elif}\;B \leq 2.6 \cdot 10^{-64}:\\ \;\;\;\;t_4\\ \mathbf{elif}\;B \leq 1.6 \cdot 10^{+36}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_2\right) \cdot \left(A - \left(\sqrt{{\left(A - C\right)}^{2} + B \cdot B} - C\right)\right)\right)}}{t_2}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]
Alternative 4
Error40.9
Cost27144
\[\begin{array}{l} t_0 := \frac{\sqrt{2}}{B}\\ t_1 := A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\\ \mathbf{if}\;B \leq -3.4 \cdot 10^{+17}:\\ \;\;\;\;\sqrt{F \cdot t_1} \cdot t_0\\ \mathbf{elif}\;B \leq 1.02 \cdot 10^{-10}:\\ \;\;\;\;\frac{-\sqrt{t_1 \cdot \left(2 \cdot F\right)}}{\mathsf{hypot}\left(B, \sqrt{A \cdot \left(C \cdot -4\right)}\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(-\sqrt{F \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)}\right)\\ \end{array} \]
Alternative 5
Error41.4
Cost21832
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -7.5 \cdot 10^{+60}:\\ \;\;\;\;\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot \frac{\sqrt{2}}{B}\\ \mathbf{elif}\;B \leq 6.5 \cdot 10^{+33}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A - \left(\sqrt{{\left(A - C\right)}^{2} + B \cdot B} - C\right)\right)\right)}}{t_0}\\ \mathbf{else}:\\ \;\;\;\;\sqrt{F \cdot \left(C - \mathsf{hypot}\left(C, B\right)\right)} \cdot \frac{-\sqrt{2}}{B}\\ \end{array} \]
Alternative 6
Error41.1
Cost21000
\[\begin{array}{l} t_0 := \frac{\sqrt{2}}{B}\\ t_1 := \mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)\\ \mathbf{if}\;B \leq -1.05 \cdot 10^{-19}:\\ \;\;\;\;\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot t_0\\ \mathbf{elif}\;B \leq 2.5 \cdot 10^{-115}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(t_1 \cdot \left(F \cdot \left(2 \cdot C\right)\right)\right)}}{t_1}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}\right)\\ \end{array} \]
Alternative 7
Error41.4
Cost20228
\[\begin{array}{l} t_0 := \frac{\sqrt{2}}{B}\\ \mathbf{if}\;B \leq -9.8 \cdot 10^{-20}:\\ \;\;\;\;\sqrt{F \cdot \left(A + \left(C - \mathsf{hypot}\left(B, A - C\right)\right)\right)} \cdot t_0\\ \mathbf{elif}\;B \leq 1.15 \cdot 10^{-114}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-4 \cdot \left(\left(A \cdot C\right) \cdot \left(F \cdot \left(C + C\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}\right)\\ \end{array} \]
Alternative 8
Error42.9
Cost20168
\[\begin{array}{l} t_0 := \frac{\sqrt{2}}{B}\\ \mathbf{if}\;B \leq -8.2 \cdot 10^{-19}:\\ \;\;\;\;t_0 \cdot \sqrt{F \cdot \left(B + A\right)}\\ \mathbf{elif}\;B \leq 2.05 \cdot 10^{-116}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-4 \cdot \left(\left(A \cdot C\right) \cdot \left(F \cdot \left(C + C\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(-\sqrt{F \cdot \left(A - \mathsf{hypot}\left(B, A\right)\right)}\right)\\ \end{array} \]
Alternative 9
Error43.7
Cost14472
\[\begin{array}{l} t_0 := \frac{\sqrt{2}}{B}\\ \mathbf{if}\;B \leq -9.8 \cdot 10^{-20}:\\ \;\;\;\;t_0 \cdot \sqrt{F \cdot \left(B + A\right)}\\ \mathbf{elif}\;B \leq 8.8 \cdot 10^{-115}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(-4 \cdot \left(\left(A \cdot C\right) \cdot \left(F \cdot \left(C + C\right)\right)\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(-\sqrt{-B \cdot F}\right)\\ \end{array} \]
Alternative 10
Error44.8
Cost14344
\[\begin{array}{l} t_0 := \frac{\sqrt{2}}{B}\\ \mathbf{if}\;B \leq -9.1 \cdot 10^{-20}:\\ \;\;\;\;t_0 \cdot \sqrt{F \cdot \left(B + A\right)}\\ \mathbf{elif}\;B \leq 1.02 \cdot 10^{-114}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -8\right) \cdot \left(\left(C + C\right) \cdot \left(C \cdot F\right)\right)}}{\mathsf{fma}\left(B, B, A \cdot \left(C \cdot -4\right)\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(-\sqrt{-B \cdot F}\right)\\ \end{array} \]
Alternative 11
Error44.9
Cost13640
\[\begin{array}{l} t_0 := \frac{\sqrt{2}}{B}\\ \mathbf{if}\;B \leq -7.5 \cdot 10^{-34}:\\ \;\;\;\;t_0 \cdot \sqrt{F \cdot \left(B + A\right)}\\ \mathbf{elif}\;B \leq 3.1 \cdot 10^{-134}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{else}:\\ \;\;\;\;t_0 \cdot \left(-\sqrt{-B \cdot F}\right)\\ \end{array} \]
Alternative 12
Error49.6
Cost13508
\[\begin{array}{l} \mathbf{if}\;B \leq -1 \cdot 10^{-33}:\\ \;\;\;\;\frac{\sqrt{2}}{B} \cdot \sqrt{F \cdot \left(B + A\right)}\\ \mathbf{elif}\;B \leq 2.15 \cdot 10^{-82}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \end{array} \]
Alternative 13
Error54.0
Cost8716
\[\begin{array}{l} t_0 := B \cdot B + -4 \cdot \left(A \cdot C\right)\\ \mathbf{if}\;B \leq -6.8 \cdot 10^{+105}:\\ \;\;\;\;-2 \cdot \sqrt{\frac{\frac{F}{\frac{B}{C}}}{B}}\\ \mathbf{elif}\;B \leq -7.2 \cdot 10^{-34}:\\ \;\;\;\;-\frac{\sqrt{2 \cdot \left(\left(F \cdot t_0\right) \cdot \left(A + \left(B + C\right)\right)\right)}}{t_0}\\ \mathbf{elif}\;B \leq 4.9 \cdot 10^{-82}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{t_0}\\ \end{array} \]
Alternative 14
Error54.5
Cost8584
\[\begin{array}{l} \mathbf{if}\;C \leq -1.4 \cdot 10^{+80}:\\ \;\;\;\;-2 \cdot \sqrt{\frac{C}{B} \cdot \frac{F}{B}}\\ \mathbf{elif}\;C \leq 1.25 \cdot 10^{-193}:\\ \;\;\;\;\frac{-\sqrt{2 \cdot \left(\left(\left(B - C\right) - A\right) \cdot \left(F \cdot \left(4 \cdot \left(A \cdot C\right) - B \cdot B\right)\right)\right)}}{B \cdot B + -4 \cdot \left(A \cdot C\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \end{array} \]
Alternative 15
Error55.3
Cost7684
\[\begin{array}{l} \mathbf{if}\;C \leq -3 \cdot 10^{-103}:\\ \;\;\;\;-2 \cdot \sqrt{\frac{C}{B} \cdot \frac{F}{B}}\\ \mathbf{else}:\\ \;\;\;\;\frac{-\sqrt{\left(A \cdot -8\right) \cdot \left(\left(A + A\right) \cdot \left(C \cdot F\right)\right)}}{A \cdot \left(C \cdot -4\right)}\\ \end{array} \]
Alternative 16
Error60.8
Cost6976
\[-2 \cdot \sqrt{F \cdot \frac{C}{B \cdot B}} \]
Alternative 17
Error60.4
Cost6976
\[-2 \cdot \sqrt{\frac{C}{B} \cdot \frac{F}{B}} \]
Alternative 18
Error62.0
Cost6848
\[-2 \cdot \frac{\sqrt{C \cdot F}}{B} \]

Error

Reproduce?

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