?

Average Error: 34.1 → 6.6
Time: 19.1s
Precision: binary64
Cost: 7692

?

\[\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a} \]
\[\begin{array}{l} t_0 := \sqrt{b_2 \cdot b_2 - a \cdot c}\\ \mathbf{if}\;b_2 \leq -1.3 \cdot 10^{+154}:\\ \;\;\;\;\frac{b_2 \cdot -2}{a}\\ \mathbf{elif}\;b_2 \leq -9.2 \cdot 10^{-284}:\\ \;\;\;\;\frac{t_0}{a} - \frac{b_2}{a}\\ \mathbf{elif}\;b_2 \leq 1.8 \cdot 10^{+94}:\\ \;\;\;\;\frac{1}{\frac{\left(-b_2\right) - t_0}{c}}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b_2}\\ \end{array} \]
(FPCore (a b_2 c)
 :precision binary64
 (/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))
(FPCore (a b_2 c)
 :precision binary64
 (let* ((t_0 (sqrt (- (* b_2 b_2) (* a c)))))
   (if (<= b_2 -1.3e+154)
     (/ (* b_2 -2.0) a)
     (if (<= b_2 -9.2e-284)
       (- (/ t_0 a) (/ b_2 a))
       (if (<= b_2 1.8e+94)
         (/ 1.0 (/ (- (- b_2) t_0) c))
         (* -0.5 (/ c b_2)))))))
double code(double a, double b_2, double c) {
	return (-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a;
}
double code(double a, double b_2, double c) {
	double t_0 = sqrt(((b_2 * b_2) - (a * c)));
	double tmp;
	if (b_2 <= -1.3e+154) {
		tmp = (b_2 * -2.0) / a;
	} else if (b_2 <= -9.2e-284) {
		tmp = (t_0 / a) - (b_2 / a);
	} else if (b_2 <= 1.8e+94) {
		tmp = 1.0 / ((-b_2 - t_0) / c);
	} else {
		tmp = -0.5 * (c / b_2);
	}
	return tmp;
}
real(8) function code(a, b_2, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_2
    real(8), intent (in) :: c
    code = (-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a
end function
real(8) function code(a, b_2, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b_2
    real(8), intent (in) :: c
    real(8) :: t_0
    real(8) :: tmp
    t_0 = sqrt(((b_2 * b_2) - (a * c)))
    if (b_2 <= (-1.3d+154)) then
        tmp = (b_2 * (-2.0d0)) / a
    else if (b_2 <= (-9.2d-284)) then
        tmp = (t_0 / a) - (b_2 / a)
    else if (b_2 <= 1.8d+94) then
        tmp = 1.0d0 / ((-b_2 - t_0) / c)
    else
        tmp = (-0.5d0) * (c / b_2)
    end if
    code = tmp
end function
public static double code(double a, double b_2, double c) {
	return (-b_2 + Math.sqrt(((b_2 * b_2) - (a * c)))) / a;
}
public static double code(double a, double b_2, double c) {
	double t_0 = Math.sqrt(((b_2 * b_2) - (a * c)));
	double tmp;
	if (b_2 <= -1.3e+154) {
		tmp = (b_2 * -2.0) / a;
	} else if (b_2 <= -9.2e-284) {
		tmp = (t_0 / a) - (b_2 / a);
	} else if (b_2 <= 1.8e+94) {
		tmp = 1.0 / ((-b_2 - t_0) / c);
	} else {
		tmp = -0.5 * (c / b_2);
	}
	return tmp;
}
def code(a, b_2, c):
	return (-b_2 + math.sqrt(((b_2 * b_2) - (a * c)))) / a
def code(a, b_2, c):
	t_0 = math.sqrt(((b_2 * b_2) - (a * c)))
	tmp = 0
	if b_2 <= -1.3e+154:
		tmp = (b_2 * -2.0) / a
	elif b_2 <= -9.2e-284:
		tmp = (t_0 / a) - (b_2 / a)
	elif b_2 <= 1.8e+94:
		tmp = 1.0 / ((-b_2 - t_0) / c)
	else:
		tmp = -0.5 * (c / b_2)
	return tmp
function code(a, b_2, c)
	return Float64(Float64(Float64(-b_2) + sqrt(Float64(Float64(b_2 * b_2) - Float64(a * c)))) / a)
end
function code(a, b_2, c)
	t_0 = sqrt(Float64(Float64(b_2 * b_2) - Float64(a * c)))
	tmp = 0.0
	if (b_2 <= -1.3e+154)
		tmp = Float64(Float64(b_2 * -2.0) / a);
	elseif (b_2 <= -9.2e-284)
		tmp = Float64(Float64(t_0 / a) - Float64(b_2 / a));
	elseif (b_2 <= 1.8e+94)
		tmp = Float64(1.0 / Float64(Float64(Float64(-b_2) - t_0) / c));
	else
		tmp = Float64(-0.5 * Float64(c / b_2));
	end
	return tmp
end
function tmp = code(a, b_2, c)
	tmp = (-b_2 + sqrt(((b_2 * b_2) - (a * c)))) / a;
end
function tmp_2 = code(a, b_2, c)
	t_0 = sqrt(((b_2 * b_2) - (a * c)));
	tmp = 0.0;
	if (b_2 <= -1.3e+154)
		tmp = (b_2 * -2.0) / a;
	elseif (b_2 <= -9.2e-284)
		tmp = (t_0 / a) - (b_2 / a);
	elseif (b_2 <= 1.8e+94)
		tmp = 1.0 / ((-b_2 - t_0) / c);
	else
		tmp = -0.5 * (c / b_2);
	end
	tmp_2 = tmp;
end
code[a_, b$95$2_, c_] := N[(N[((-b$95$2) + N[Sqrt[N[(N[(b$95$2 * b$95$2), $MachinePrecision] - N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision]
code[a_, b$95$2_, c_] := Block[{t$95$0 = N[Sqrt[N[(N[(b$95$2 * b$95$2), $MachinePrecision] - N[(a * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]}, If[LessEqual[b$95$2, -1.3e+154], N[(N[(b$95$2 * -2.0), $MachinePrecision] / a), $MachinePrecision], If[LessEqual[b$95$2, -9.2e-284], N[(N[(t$95$0 / a), $MachinePrecision] - N[(b$95$2 / a), $MachinePrecision]), $MachinePrecision], If[LessEqual[b$95$2, 1.8e+94], N[(1.0 / N[(N[((-b$95$2) - t$95$0), $MachinePrecision] / c), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b$95$2), $MachinePrecision]), $MachinePrecision]]]]]
\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a}
\begin{array}{l}
t_0 := \sqrt{b_2 \cdot b_2 - a \cdot c}\\
\mathbf{if}\;b_2 \leq -1.3 \cdot 10^{+154}:\\
\;\;\;\;\frac{b_2 \cdot -2}{a}\\

\mathbf{elif}\;b_2 \leq -9.2 \cdot 10^{-284}:\\
\;\;\;\;\frac{t_0}{a} - \frac{b_2}{a}\\

\mathbf{elif}\;b_2 \leq 1.8 \cdot 10^{+94}:\\
\;\;\;\;\frac{1}{\frac{\left(-b_2\right) - t_0}{c}}\\

\mathbf{else}:\\
\;\;\;\;-0.5 \cdot \frac{c}{b_2}\\


\end{array}

Error?

Try it out?

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation?

  1. Split input into 4 regimes
  2. if b_2 < -1.29999999999999994e154

    1. Initial program 64.0

      \[\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a} \]
    2. Simplified64.0

      \[\leadsto \color{blue}{\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}} \]
      Proof

      [Start]64.0

      \[ \frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a} \]

      +-commutative [=>]64.0

      \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} + \left(-b_2\right)}}{a} \]

      unsub-neg [=>]64.0

      \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}{a} \]
    3. Taylor expanded in b_2 around -inf 2.5

      \[\leadsto \frac{\color{blue}{-2 \cdot b_2}}{a} \]
    4. Simplified2.5

      \[\leadsto \frac{\color{blue}{b_2 \cdot -2}}{a} \]
      Proof

      [Start]2.5

      \[ \frac{-2 \cdot b_2}{a} \]

      *-commutative [=>]2.5

      \[ \frac{\color{blue}{b_2 \cdot -2}}{a} \]

    if -1.29999999999999994e154 < b_2 < -9.2e-284

    1. Initial program 8.0

      \[\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a} \]
    2. Simplified8.0

      \[\leadsto \color{blue}{\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}} \]
      Proof

      [Start]8.0

      \[ \frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a} \]

      +-commutative [=>]8.0

      \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} + \left(-b_2\right)}}{a} \]

      unsub-neg [=>]8.0

      \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}{a} \]
    3. Applied egg-rr8.0

      \[\leadsto \color{blue}{\frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a} - \frac{b_2}{a}} \]

    if -9.2e-284 < b_2 < 1.79999999999999996e94

    1. Initial program 32.1

      \[\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a} \]
    2. Simplified32.1

      \[\leadsto \color{blue}{\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}} \]
      Proof

      [Start]32.1

      \[ \frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a} \]

      +-commutative [=>]32.1

      \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} + \left(-b_2\right)}}{a} \]

      unsub-neg [=>]32.1

      \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}{a} \]
    3. Applied egg-rr32.2

      \[\leadsto \frac{\color{blue}{\frac{\left(b_2 \cdot b_2 - a \cdot c\right) - \left(-b_2\right) \cdot \left(-b_2\right)}{\sqrt{b_2 \cdot b_2 - a \cdot c} - \left(-b_2\right)}}}{a} \]
    4. Simplified32.2

      \[\leadsto \frac{\color{blue}{\frac{b_2 \cdot b_2 - \left(c \cdot a + b_2 \cdot b_2\right)}{\sqrt{b_2 \cdot b_2 - c \cdot a} - \left(-b_2\right)}}}{a} \]
      Proof

      [Start]32.2

      \[ \frac{\frac{\left(b_2 \cdot b_2 - a \cdot c\right) - \left(-b_2\right) \cdot \left(-b_2\right)}{\sqrt{b_2 \cdot b_2 - a \cdot c} - \left(-b_2\right)}}{a} \]

      associate--l- [=>]32.2

      \[ \frac{\frac{\color{blue}{b_2 \cdot b_2 - \left(a \cdot c + \left(-b_2\right) \cdot \left(-b_2\right)\right)}}{\sqrt{b_2 \cdot b_2 - a \cdot c} - \left(-b_2\right)}}{a} \]

      sqr-neg [=>]32.2

      \[ \frac{\frac{b_2 \cdot b_2 - \left(a \cdot c + \color{blue}{b_2 \cdot b_2}\right)}{\sqrt{b_2 \cdot b_2 - a \cdot c} - \left(-b_2\right)}}{a} \]

      *-commutative [=>]32.2

      \[ \frac{\frac{b_2 \cdot b_2 - \left(\color{blue}{c \cdot a} + b_2 \cdot b_2\right)}{\sqrt{b_2 \cdot b_2 - a \cdot c} - \left(-b_2\right)}}{a} \]

      *-commutative [=>]32.2

      \[ \frac{\frac{b_2 \cdot b_2 - \left(c \cdot a + b_2 \cdot b_2\right)}{\sqrt{b_2 \cdot b_2 - \color{blue}{c \cdot a}} - \left(-b_2\right)}}{a} \]
    5. Applied egg-rr32.2

      \[\leadsto \frac{\color{blue}{\left(b_2 \cdot b_2 - \left(c \cdot a + b_2 \cdot b_2\right)\right) \cdot \frac{1}{\sqrt{b_2 \cdot b_2 - c \cdot a} - \left(-b_2\right)}}}{a} \]
    6. Simplified16.1

      \[\leadsto \frac{\color{blue}{\frac{0 - c \cdot a}{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}}}{a} \]
      Proof

      [Start]32.2

      \[ \frac{\left(b_2 \cdot b_2 - \left(c \cdot a + b_2 \cdot b_2\right)\right) \cdot \frac{1}{\sqrt{b_2 \cdot b_2 - c \cdot a} - \left(-b_2\right)}}{a} \]

      associate-*r/ [=>]32.2

      \[ \frac{\color{blue}{\frac{\left(b_2 \cdot b_2 - \left(c \cdot a + b_2 \cdot b_2\right)\right) \cdot 1}{\sqrt{b_2 \cdot b_2 - c \cdot a} - \left(-b_2\right)}}}{a} \]

      *-rgt-identity [=>]32.2

      \[ \frac{\frac{\color{blue}{b_2 \cdot b_2 - \left(c \cdot a + b_2 \cdot b_2\right)}}{\sqrt{b_2 \cdot b_2 - c \cdot a} - \left(-b_2\right)}}{a} \]

      +-commutative [=>]32.2

      \[ \frac{\frac{b_2 \cdot b_2 - \color{blue}{\left(b_2 \cdot b_2 + c \cdot a\right)}}{\sqrt{b_2 \cdot b_2 - c \cdot a} - \left(-b_2\right)}}{a} \]

      associate--r+ [=>]16.1

      \[ \frac{\frac{\color{blue}{\left(b_2 \cdot b_2 - b_2 \cdot b_2\right) - c \cdot a}}{\sqrt{b_2 \cdot b_2 - c \cdot a} - \left(-b_2\right)}}{a} \]

      +-inverses [=>]16.1

      \[ \frac{\frac{\color{blue}{0} - c \cdot a}{\sqrt{b_2 \cdot b_2 - c \cdot a} - \left(-b_2\right)}}{a} \]

      neg-sub0 [=>]16.1

      \[ \frac{\frac{0 - c \cdot a}{\sqrt{b_2 \cdot b_2 - c \cdot a} - \color{blue}{\left(0 - b_2\right)}}}{a} \]

      associate-+l- [<=]16.1

      \[ \frac{\frac{0 - c \cdot a}{\color{blue}{\left(\sqrt{b_2 \cdot b_2 - c \cdot a} - 0\right) + b_2}}}{a} \]

      +-commutative [<=]16.1

      \[ \frac{\frac{0 - c \cdot a}{\color{blue}{b_2 + \left(\sqrt{b_2 \cdot b_2 - c \cdot a} - 0\right)}}}{a} \]

      --rgt-identity [=>]16.1

      \[ \frac{\frac{0 - c \cdot a}{b_2 + \color{blue}{\sqrt{b_2 \cdot b_2 - c \cdot a}}}}{a} \]
    7. Applied egg-rr16.3

      \[\leadsto \color{blue}{{\left(a \cdot \frac{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}{0 - c \cdot a}\right)}^{-1}} \]
    8. Simplified16.3

      \[\leadsto \color{blue}{\frac{1}{a \cdot \frac{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}{\left(-c\right) \cdot a}}} \]
      Proof

      [Start]16.3

      \[ {\left(a \cdot \frac{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}{0 - c \cdot a}\right)}^{-1} \]

      unpow-1 [=>]16.3

      \[ \color{blue}{\frac{1}{a \cdot \frac{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}{0 - c \cdot a}}} \]

      sub0-neg [=>]16.3

      \[ \frac{1}{a \cdot \frac{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}{\color{blue}{-c \cdot a}}} \]

      mul-1-neg [<=]16.3

      \[ \frac{1}{a \cdot \frac{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}{\color{blue}{-1 \cdot \left(c \cdot a\right)}}} \]

      associate-*r* [=>]16.3

      \[ \frac{1}{a \cdot \frac{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}{\color{blue}{\left(-1 \cdot c\right) \cdot a}}} \]

      neg-mul-1 [<=]16.3

      \[ \frac{1}{a \cdot \frac{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}{\color{blue}{\left(-c\right)} \cdot a}} \]
    9. Applied egg-rr20.6

      \[\leadsto \frac{1}{\color{blue}{\frac{a \cdot \left(-\left(b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}\right)\right)}{c \cdot a}}} \]
    10. Simplified9.5

      \[\leadsto \frac{1}{\color{blue}{\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - c \cdot a}}{c}}} \]
      Proof

      [Start]20.6

      \[ \frac{1}{\frac{a \cdot \left(-\left(b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}\right)\right)}{c \cdot a}} \]

      *-commutative [=>]20.6

      \[ \frac{1}{\frac{a \cdot \left(-\left(b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}\right)\right)}{\color{blue}{a \cdot c}}} \]

      times-frac [=>]9.5

      \[ \frac{1}{\color{blue}{\frac{a}{a} \cdot \frac{-\left(b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}\right)}{c}}} \]

      *-inverses [=>]9.5

      \[ \frac{1}{\color{blue}{1} \cdot \frac{-\left(b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}\right)}{c}} \]

      distribute-frac-neg [=>]9.5

      \[ \frac{1}{1 \cdot \color{blue}{\left(-\frac{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}{c}\right)}} \]

      distribute-rgt-neg-in [<=]9.5

      \[ \frac{1}{\color{blue}{-1 \cdot \frac{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}{c}}} \]

      *-lft-identity [=>]9.5

      \[ \frac{1}{-\color{blue}{\frac{b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}}{c}}} \]

      distribute-frac-neg [<=]9.5

      \[ \frac{1}{\color{blue}{\frac{-\left(b_2 + \sqrt{b_2 \cdot b_2 - c \cdot a}\right)}{c}}} \]

      distribute-neg-in [=>]9.5

      \[ \frac{1}{\frac{\color{blue}{\left(-b_2\right) + \left(-\sqrt{b_2 \cdot b_2 - c \cdot a}\right)}}{c}} \]

      unsub-neg [=>]9.5

      \[ \frac{1}{\frac{\color{blue}{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - c \cdot a}}}{c}} \]

    if 1.79999999999999996e94 < b_2

    1. Initial program 59.2

      \[\frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a} \]
    2. Simplified59.2

      \[\leadsto \color{blue}{\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}} \]
      Proof

      [Start]59.2

      \[ \frac{\left(-b_2\right) + \sqrt{b_2 \cdot b_2 - a \cdot c}}{a} \]

      +-commutative [=>]59.2

      \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} + \left(-b_2\right)}}{a} \]

      unsub-neg [=>]59.2

      \[ \frac{\color{blue}{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}}{a} \]
    3. Taylor expanded in b_2 around inf 2.6

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b_2}} \]
  3. Recombined 4 regimes into one program.
  4. Final simplification6.6

    \[\leadsto \begin{array}{l} \mathbf{if}\;b_2 \leq -1.3 \cdot 10^{+154}:\\ \;\;\;\;\frac{b_2 \cdot -2}{a}\\ \mathbf{elif}\;b_2 \leq -9.2 \cdot 10^{-284}:\\ \;\;\;\;\frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a} - \frac{b_2}{a}\\ \mathbf{elif}\;b_2 \leq 1.8 \cdot 10^{+94}:\\ \;\;\;\;\frac{1}{\frac{\left(-b_2\right) - \sqrt{b_2 \cdot b_2 - a \cdot c}}{c}}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b_2}\\ \end{array} \]

Alternatives

Alternative 1
Error9.8
Cost7496
\[\begin{array}{l} \mathbf{if}\;b_2 \leq -1.3 \cdot 10^{+154}:\\ \;\;\;\;\frac{b_2 \cdot -2}{a}\\ \mathbf{elif}\;b_2 \leq 1.45 \cdot 10^{-84}:\\ \;\;\;\;\frac{\sqrt{b_2 \cdot b_2 - a \cdot c}}{a} - \frac{b_2}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b_2}\\ \end{array} \]
Alternative 2
Error9.8
Cost7368
\[\begin{array}{l} \mathbf{if}\;b_2 \leq -1.35 \cdot 10^{+154}:\\ \;\;\;\;\frac{b_2 \cdot -2}{a}\\ \mathbf{elif}\;b_2 \leq 2.6 \cdot 10^{-89}:\\ \;\;\;\;\frac{\sqrt{b_2 \cdot b_2 - a \cdot c} - b_2}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b_2}\\ \end{array} \]
Alternative 3
Error13.8
Cost7304
\[\begin{array}{l} \mathbf{if}\;b_2 \leq -3.2 \cdot 10^{-22}:\\ \;\;\;\;-2 \cdot \frac{b_2}{a} + \frac{c}{b_2} \cdot 0.5\\ \mathbf{elif}\;b_2 \leq 1.1 \cdot 10^{-117}:\\ \;\;\;\;\frac{1}{a} \cdot \left(\sqrt{a \cdot \left(-c\right)} - b_2\right)\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b_2}\\ \end{array} \]
Alternative 4
Error13.7
Cost7176
\[\begin{array}{l} \mathbf{if}\;b_2 \leq -7.2 \cdot 10^{-26}:\\ \;\;\;\;-2 \cdot \frac{b_2}{a} + \frac{c}{b_2} \cdot 0.5\\ \mathbf{elif}\;b_2 \leq 2.9 \cdot 10^{-111}:\\ \;\;\;\;\frac{\sqrt{a \cdot \left(-c\right)} - b_2}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b_2}\\ \end{array} \]
Alternative 5
Error14.1
Cost7048
\[\begin{array}{l} \mathbf{if}\;b_2 \leq -2.35 \cdot 10^{-26}:\\ \;\;\;\;-2 \cdot \frac{b_2}{a} + \frac{c}{b_2} \cdot 0.5\\ \mathbf{elif}\;b_2 \leq 1.05 \cdot 10^{-111}:\\ \;\;\;\;\frac{\sqrt{a \cdot \left(-c\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b_2}\\ \end{array} \]
Alternative 6
Error22.1
Cost452
\[\begin{array}{l} \mathbf{if}\;b_2 \leq 1.85 \cdot 10^{-272}:\\ \;\;\;\;\frac{b_2 \cdot -2}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b_2}\\ \end{array} \]
Alternative 7
Error39.9
Cost320
\[-0.5 \cdot \frac{c}{b_2} \]

Error

Reproduce?

herbie shell --seed 2023187 
(FPCore (a b_2 c)
  :name "quad2p (problem 3.2.1, positive)"
  :precision binary64
  (/ (+ (- b_2) (sqrt (- (* b_2 b_2) (* a c)))) a))