Cubic critical

Percentage Accurate: 52.4% → 85.8%
Time: 15.5s
Alternatives: 13
Speedup: 16.4×

Specification

?
\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\end{array}

Sampling outcomes in binary64 precision:

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.

Accuracy vs Speed?

Herbie found 13 alternatives:

AlternativeAccuracySpeedup
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.

Initial Program: 52.4% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))
double code(double a, double b, double c) {
	return (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\end{array}

Alternative 1: 85.8% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+166}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-2, b, \frac{a}{\frac{b}{c}} \cdot 1.5\right)}{a \cdot 3}\\ \mathbf{elif}\;b \leq 3.55 \cdot 10^{-66}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -5e+166)
   (/ (fma -2.0 b (* (/ a (/ b c)) 1.5)) (* a 3.0))
   (if (<= b 3.55e-66)
     (/ (- (sqrt (- (* b b) (* c (* a 3.0)))) b) (* a 3.0))
     (/ (* c -0.5) b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -5e+166) {
		tmp = fma(-2.0, b, ((a / (b / c)) * 1.5)) / (a * 3.0);
	} else if (b <= 3.55e-66) {
		tmp = (sqrt(((b * b) - (c * (a * 3.0)))) - b) / (a * 3.0);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= -5e+166)
		tmp = Float64(fma(-2.0, b, Float64(Float64(a / Float64(b / c)) * 1.5)) / Float64(a * 3.0));
	elseif (b <= 3.55e-66)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(c * Float64(a * 3.0)))) - b) / Float64(a * 3.0));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, -5e+166], N[(N[(-2.0 * b + N[(N[(a / N[(b / c), $MachinePrecision]), $MachinePrecision] * 1.5), $MachinePrecision]), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.55e-66], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(c * N[(a * 3.0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+166}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-2, b, \frac{a}{\frac{b}{c}} \cdot 1.5\right)}{a \cdot 3}\\

\mathbf{elif}\;b \leq 3.55 \cdot 10^{-66}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.0000000000000002e166

    1. Initial program 37.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*37.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified37.5%

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

      \[\leadsto \frac{\color{blue}{-2 \cdot b + 1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
    5. Step-by-step derivation
      1. fma-def90.2%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-2, b, 1.5 \cdot \frac{a \cdot c}{b}\right)}}{3 \cdot a} \]
      2. *-commutative90.2%

        \[\leadsto \frac{\mathsf{fma}\left(-2, b, \color{blue}{\frac{a \cdot c}{b} \cdot 1.5}\right)}{3 \cdot a} \]
      3. associate-/l*97.5%

        \[\leadsto \frac{\mathsf{fma}\left(-2, b, \color{blue}{\frac{a}{\frac{b}{c}}} \cdot 1.5\right)}{3 \cdot a} \]
    6. Simplified97.5%

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

    if -5.0000000000000002e166 < b < 3.54999999999999982e-66

    1. Initial program 77.7%

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

    if 3.54999999999999982e-66 < b

    1. Initial program 9.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*9.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified9.8%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    5. Step-by-step derivation
      1. associate-*r/93.1%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
    6. Simplified93.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+166}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-2, b, \frac{a}{\frac{b}{c}} \cdot 1.5\right)}{a \cdot 3}\\ \mathbf{elif}\;b \leq 3.55 \cdot 10^{-66}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

Alternative 2: 85.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+166}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-2, b, \frac{a}{\frac{b}{c}} \cdot 1.5\right)}{a \cdot 3}\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-78}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -5e+166)
   (/ (fma -2.0 b (* (/ a (/ b c)) 1.5)) (* a 3.0))
   (if (<= b 1.15e-78)
     (/ (- (sqrt (- (* b b) (* 3.0 (* a c)))) b) (* a 3.0))
     (/ (* c -0.5) b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -5e+166) {
		tmp = fma(-2.0, b, ((a / (b / c)) * 1.5)) / (a * 3.0);
	} else if (b <= 1.15e-78) {
		tmp = (sqrt(((b * b) - (3.0 * (a * c)))) - b) / (a * 3.0);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= -5e+166)
		tmp = Float64(fma(-2.0, b, Float64(Float64(a / Float64(b / c)) * 1.5)) / Float64(a * 3.0));
	elseif (b <= 1.15e-78)
		tmp = Float64(Float64(sqrt(Float64(Float64(b * b) - Float64(3.0 * Float64(a * c)))) - b) / Float64(a * 3.0));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, -5e+166], N[(N[(-2.0 * b + N[(N[(a / N[(b / c), $MachinePrecision]), $MachinePrecision] * 1.5), $MachinePrecision]), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.15e-78], N[(N[(N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{+166}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-2, b, \frac{a}{\frac{b}{c}} \cdot 1.5\right)}{a \cdot 3}\\

\mathbf{elif}\;b \leq 1.15 \cdot 10^{-78}:\\
\;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -5.0000000000000002e166

    1. Initial program 37.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*37.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified37.5%

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

      \[\leadsto \frac{\color{blue}{-2 \cdot b + 1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
    5. Step-by-step derivation
      1. fma-def90.2%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-2, b, 1.5 \cdot \frac{a \cdot c}{b}\right)}}{3 \cdot a} \]
      2. *-commutative90.2%

        \[\leadsto \frac{\mathsf{fma}\left(-2, b, \color{blue}{\frac{a \cdot c}{b} \cdot 1.5}\right)}{3 \cdot a} \]
      3. associate-/l*97.5%

        \[\leadsto \frac{\mathsf{fma}\left(-2, b, \color{blue}{\frac{a}{\frac{b}{c}}} \cdot 1.5\right)}{3 \cdot a} \]
    6. Simplified97.5%

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

    if -5.0000000000000002e166 < b < 1.1500000000000001e-78

    1. Initial program 77.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*77.6%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified77.6%

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

    if 1.1500000000000001e-78 < b

    1. Initial program 9.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*9.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified9.8%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    5. Step-by-step derivation
      1. associate-*r/93.1%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
    6. Simplified93.1%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification86.5%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{+166}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-2, b, \frac{a}{\frac{b}{c}} \cdot 1.5\right)}{a \cdot 3}\\ \mathbf{elif}\;b \leq 1.15 \cdot 10^{-78}:\\ \;\;\;\;\frac{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}{a \cdot 3}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

Alternative 3: 81.5% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -9.6 \cdot 10^{-73}:\\ \;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{-68}:\\ \;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\left(a \cdot c\right) \cdot -3} - b\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -9.6e-73)
   (* (/ -0.3333333333333333 a) (+ b (- b (/ (* a 1.5) (/ b c)))))
   (if (<= b 3.7e-68)
     (* (/ 0.3333333333333333 a) (- (sqrt (* (* a c) -3.0)) b))
     (/ (* c -0.5) b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -9.6e-73) {
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))));
	} else if (b <= 3.7e-68) {
		tmp = (0.3333333333333333 / a) * (sqrt(((a * c) * -3.0)) - b);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-9.6d-73)) then
        tmp = ((-0.3333333333333333d0) / a) * (b + (b - ((a * 1.5d0) / (b / c))))
    else if (b <= 3.7d-68) then
        tmp = (0.3333333333333333d0 / a) * (sqrt(((a * c) * (-3.0d0))) - b)
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -9.6e-73) {
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))));
	} else if (b <= 3.7e-68) {
		tmp = (0.3333333333333333 / a) * (Math.sqrt(((a * c) * -3.0)) - b);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -9.6e-73:
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))))
	elif b <= 3.7e-68:
		tmp = (0.3333333333333333 / a) * (math.sqrt(((a * c) * -3.0)) - b)
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -9.6e-73)
		tmp = Float64(Float64(-0.3333333333333333 / a) * Float64(b + Float64(b - Float64(Float64(a * 1.5) / Float64(b / c)))));
	elseif (b <= 3.7e-68)
		tmp = Float64(Float64(0.3333333333333333 / a) * Float64(sqrt(Float64(Float64(a * c) * -3.0)) - b));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -9.6e-73)
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))));
	elseif (b <= 3.7e-68)
		tmp = (0.3333333333333333 / a) * (sqrt(((a * c) * -3.0)) - b);
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -9.6e-73], N[(N[(-0.3333333333333333 / a), $MachinePrecision] * N[(b + N[(b - N[(N[(a * 1.5), $MachinePrecision] / N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.7e-68], N[(N[(0.3333333333333333 / a), $MachinePrecision] * N[(N[Sqrt[N[(N[(a * c), $MachinePrecision] * -3.0), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -9.6 \cdot 10^{-73}:\\
\;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)\\

\mathbf{elif}\;b \leq 3.7 \cdot 10^{-68}:\\
\;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\left(a \cdot c\right) \cdot -3} - b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -9.60000000000000022e-73

    1. Initial program 65.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*65.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified65.2%

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

      \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(-1 \cdot b + 1.5 \cdot \frac{a \cdot c}{b}\right)}}{3 \cdot a} \]
    5. Step-by-step derivation
      1. +-commutative81.5%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(1.5 \cdot \frac{a \cdot c}{b} + -1 \cdot b\right)}}{3 \cdot a} \]
      2. mul-1-neg81.5%

        \[\leadsto \frac{\left(-b\right) + \left(1.5 \cdot \frac{a \cdot c}{b} + \color{blue}{\left(-b\right)}\right)}{3 \cdot a} \]
      3. unsub-neg81.5%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(1.5 \cdot \frac{a \cdot c}{b} - b\right)}}{3 \cdot a} \]
      4. associate-*r/81.5%

        \[\leadsto \frac{\left(-b\right) + \left(\color{blue}{\frac{1.5 \cdot \left(a \cdot c\right)}{b}} - b\right)}{3 \cdot a} \]
      5. associate-*r*81.5%

        \[\leadsto \frac{\left(-b\right) + \left(\frac{\color{blue}{\left(1.5 \cdot a\right) \cdot c}}{b} - b\right)}{3 \cdot a} \]
    6. Simplified81.5%

      \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(\frac{\left(1.5 \cdot a\right) \cdot c}{b} - b\right)}}{3 \cdot a} \]
    7. Step-by-step derivation
      1. frac-2neg81.5%

        \[\leadsto \color{blue}{\frac{-\left(\left(-b\right) + \left(\frac{\left(1.5 \cdot a\right) \cdot c}{b} - b\right)\right)}{-3 \cdot a}} \]
      2. div-inv81.4%

        \[\leadsto \color{blue}{\left(-\left(\left(-b\right) + \left(\frac{\left(1.5 \cdot a\right) \cdot c}{b} - b\right)\right)\right) \cdot \frac{1}{-3 \cdot a}} \]
    8. Applied egg-rr84.9%

      \[\leadsto \color{blue}{\left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \cdot \frac{1}{a \cdot -3}} \]
    9. Step-by-step derivation
      1. *-commutative84.9%

        \[\leadsto \color{blue}{\frac{1}{a \cdot -3} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right)} \]
      2. *-commutative84.9%

        \[\leadsto \frac{1}{\color{blue}{-3 \cdot a}} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \]
      3. associate-/r*84.8%

        \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{a}} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \]
      4. metadata-eval84.8%

        \[\leadsto \frac{\color{blue}{-0.3333333333333333}}{a} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \]
      5. +-commutative84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \color{blue}{\left(b + \left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right)\right)} \]
      6. *-commutative84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \color{blue}{\left(1.5 \cdot \frac{a}{b}\right) \cdot c}\right)\right) \]
      7. associate-*r/84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \color{blue}{\frac{1.5 \cdot a}{b}} \cdot c\right)\right) \]
      8. *-commutative84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{\color{blue}{a \cdot 1.5}}{b} \cdot c\right)\right) \]
      9. associate-/r/84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \color{blue}{\frac{a \cdot 1.5}{\frac{b}{c}}}\right)\right) \]
    10. Simplified84.8%

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)} \]

    if -9.60000000000000022e-73 < b < 3.70000000000000002e-68

    1. Initial program 70.1%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*69.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified69.9%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Step-by-step derivation
      1. +-commutative69.9%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} + \left(-b\right)}}{3 \cdot a} \]
      2. unsub-neg69.9%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}}{3 \cdot a} \]
      3. *-un-lft-identity69.9%

        \[\leadsto \frac{\sqrt{\color{blue}{1 \cdot \left(b \cdot b - 3 \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      4. cancel-sign-sub-inv69.9%

        \[\leadsto \frac{\sqrt{1 \cdot \color{blue}{\left(b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      5. *-un-lft-identity69.9%

        \[\leadsto \frac{\sqrt{\color{blue}{b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)}} - b}{3 \cdot a} \]
      6. +-commutative69.9%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(-3\right) \cdot \left(a \cdot c\right) + b \cdot b}} - b}{3 \cdot a} \]
      7. metadata-eval69.9%

        \[\leadsto \frac{\sqrt{\color{blue}{-3} \cdot \left(a \cdot c\right) + b \cdot b} - b}{3 \cdot a} \]
      8. *-commutative69.9%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3} + b \cdot b} - b}{3 \cdot a} \]
      9. associate-*r*70.0%

        \[\leadsto \frac{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)} + b \cdot b} - b}{3 \cdot a} \]
      10. fma-udef70.0%

        \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}} - b}{3 \cdot a} \]
      11. div-sub70.0%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} - \frac{b}{3 \cdot a}} \]
      12. sub-neg70.0%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} + \left(-\frac{b}{3 \cdot a}\right)} \]
    5. Applied egg-rr70.0%

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} + \left(-b \cdot \frac{0.3333333333333333}{a}\right)} \]
    6. Step-by-step derivation
      1. sub-neg70.0%

        \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} - b \cdot \frac{0.3333333333333333}{a}} \]
      2. distribute-rgt-out--70.0%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    7. Simplified70.0%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    8. Taylor expanded in a around inf 62.7%

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

    if 3.70000000000000002e-68 < b

    1. Initial program 9.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*9.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified9.8%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    5. Step-by-step derivation
      1. associate-*r/93.1%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
    6. Simplified93.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -9.6 \cdot 10^{-73}:\\ \;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)\\ \mathbf{elif}\;b \leq 3.7 \cdot 10^{-68}:\\ \;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\left(a \cdot c\right) \cdot -3} - b\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

Alternative 4: 81.6% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.72 \cdot 10^{-74}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-2, b, \frac{a}{\frac{b}{c}} \cdot 1.5\right)}{a \cdot 3}\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-69}:\\ \;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\left(a \cdot c\right) \cdot -3} - b\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1.72e-74)
   (/ (fma -2.0 b (* (/ a (/ b c)) 1.5)) (* a 3.0))
   (if (<= b 1.5e-69)
     (* (/ 0.3333333333333333 a) (- (sqrt (* (* a c) -3.0)) b))
     (/ (* c -0.5) b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1.72e-74) {
		tmp = fma(-2.0, b, ((a / (b / c)) * 1.5)) / (a * 3.0);
	} else if (b <= 1.5e-69) {
		tmp = (0.3333333333333333 / a) * (sqrt(((a * c) * -3.0)) - b);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
function code(a, b, c)
	tmp = 0.0
	if (b <= -1.72e-74)
		tmp = Float64(fma(-2.0, b, Float64(Float64(a / Float64(b / c)) * 1.5)) / Float64(a * 3.0));
	elseif (b <= 1.5e-69)
		tmp = Float64(Float64(0.3333333333333333 / a) * Float64(sqrt(Float64(Float64(a * c) * -3.0)) - b));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
code[a_, b_, c_] := If[LessEqual[b, -1.72e-74], N[(N[(-2.0 * b + N[(N[(a / N[(b / c), $MachinePrecision]), $MachinePrecision] * 1.5), $MachinePrecision]), $MachinePrecision] / N[(a * 3.0), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 1.5e-69], N[(N[(0.3333333333333333 / a), $MachinePrecision] * N[(N[Sqrt[N[(N[(a * c), $MachinePrecision] * -3.0), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.72 \cdot 10^{-74}:\\
\;\;\;\;\frac{\mathsf{fma}\left(-2, b, \frac{a}{\frac{b}{c}} \cdot 1.5\right)}{a \cdot 3}\\

\mathbf{elif}\;b \leq 1.5 \cdot 10^{-69}:\\
\;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\left(a \cdot c\right) \cdot -3} - b\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.72e-74

    1. Initial program 65.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*65.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified65.2%

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

      \[\leadsto \frac{\color{blue}{-2 \cdot b + 1.5 \cdot \frac{a \cdot c}{b}}}{3 \cdot a} \]
    5. Step-by-step derivation
      1. fma-def81.5%

        \[\leadsto \frac{\color{blue}{\mathsf{fma}\left(-2, b, 1.5 \cdot \frac{a \cdot c}{b}\right)}}{3 \cdot a} \]
      2. *-commutative81.5%

        \[\leadsto \frac{\mathsf{fma}\left(-2, b, \color{blue}{\frac{a \cdot c}{b} \cdot 1.5}\right)}{3 \cdot a} \]
      3. associate-/l*84.9%

        \[\leadsto \frac{\mathsf{fma}\left(-2, b, \color{blue}{\frac{a}{\frac{b}{c}}} \cdot 1.5\right)}{3 \cdot a} \]
    6. Simplified84.9%

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

    if -1.72e-74 < b < 1.49999999999999995e-69

    1. Initial program 70.1%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*69.9%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified69.9%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Step-by-step derivation
      1. +-commutative69.9%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} + \left(-b\right)}}{3 \cdot a} \]
      2. unsub-neg69.9%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}}{3 \cdot a} \]
      3. *-un-lft-identity69.9%

        \[\leadsto \frac{\sqrt{\color{blue}{1 \cdot \left(b \cdot b - 3 \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      4. cancel-sign-sub-inv69.9%

        \[\leadsto \frac{\sqrt{1 \cdot \color{blue}{\left(b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      5. *-un-lft-identity69.9%

        \[\leadsto \frac{\sqrt{\color{blue}{b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)}} - b}{3 \cdot a} \]
      6. +-commutative69.9%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(-3\right) \cdot \left(a \cdot c\right) + b \cdot b}} - b}{3 \cdot a} \]
      7. metadata-eval69.9%

        \[\leadsto \frac{\sqrt{\color{blue}{-3} \cdot \left(a \cdot c\right) + b \cdot b} - b}{3 \cdot a} \]
      8. *-commutative69.9%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3} + b \cdot b} - b}{3 \cdot a} \]
      9. associate-*r*70.0%

        \[\leadsto \frac{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)} + b \cdot b} - b}{3 \cdot a} \]
      10. fma-udef70.0%

        \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}} - b}{3 \cdot a} \]
      11. div-sub70.0%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} - \frac{b}{3 \cdot a}} \]
      12. sub-neg70.0%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} + \left(-\frac{b}{3 \cdot a}\right)} \]
    5. Applied egg-rr70.0%

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} + \left(-b \cdot \frac{0.3333333333333333}{a}\right)} \]
    6. Step-by-step derivation
      1. sub-neg70.0%

        \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} - b \cdot \frac{0.3333333333333333}{a}} \]
      2. distribute-rgt-out--70.0%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    7. Simplified70.0%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    8. Taylor expanded in a around inf 62.7%

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

    if 1.49999999999999995e-69 < b

    1. Initial program 9.8%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*9.8%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified9.8%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    5. Step-by-step derivation
      1. associate-*r/93.1%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
    6. Simplified93.1%

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

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.72 \cdot 10^{-74}:\\ \;\;\;\;\frac{\mathsf{fma}\left(-2, b, \frac{a}{\frac{b}{c}} \cdot 1.5\right)}{a \cdot 3}\\ \mathbf{elif}\;b \leq 1.5 \cdot 10^{-69}:\\ \;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\left(a \cdot c\right) \cdot -3} - b\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

Alternative 5: 80.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -2.95 \cdot 10^{-74}:\\ \;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{-143}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\sqrt{a \cdot \left(c \cdot -3\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -2.95e-74)
   (* (/ -0.3333333333333333 a) (+ b (- b (/ (* a 1.5) (/ b c)))))
   (if (<= b 3.3e-143)
     (* 0.3333333333333333 (/ (sqrt (* a (* c -3.0))) a))
     (/ (* c -0.5) b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -2.95e-74) {
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))));
	} else if (b <= 3.3e-143) {
		tmp = 0.3333333333333333 * (sqrt((a * (c * -3.0))) / a);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-2.95d-74)) then
        tmp = ((-0.3333333333333333d0) / a) * (b + (b - ((a * 1.5d0) / (b / c))))
    else if (b <= 3.3d-143) then
        tmp = 0.3333333333333333d0 * (sqrt((a * (c * (-3.0d0)))) / a)
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -2.95e-74) {
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))));
	} else if (b <= 3.3e-143) {
		tmp = 0.3333333333333333 * (Math.sqrt((a * (c * -3.0))) / a);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -2.95e-74:
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))))
	elif b <= 3.3e-143:
		tmp = 0.3333333333333333 * (math.sqrt((a * (c * -3.0))) / a)
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -2.95e-74)
		tmp = Float64(Float64(-0.3333333333333333 / a) * Float64(b + Float64(b - Float64(Float64(a * 1.5) / Float64(b / c)))));
	elseif (b <= 3.3e-143)
		tmp = Float64(0.3333333333333333 * Float64(sqrt(Float64(a * Float64(c * -3.0))) / a));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -2.95e-74)
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))));
	elseif (b <= 3.3e-143)
		tmp = 0.3333333333333333 * (sqrt((a * (c * -3.0))) / a);
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -2.95e-74], N[(N[(-0.3333333333333333 / a), $MachinePrecision] * N[(b + N[(b - N[(N[(a * 1.5), $MachinePrecision] / N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.3e-143], N[(0.3333333333333333 * N[(N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -2.95 \cdot 10^{-74}:\\
\;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)\\

\mathbf{elif}\;b \leq 3.3 \cdot 10^{-143}:\\
\;\;\;\;0.3333333333333333 \cdot \frac{\sqrt{a \cdot \left(c \cdot -3\right)}}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -2.94999999999999983e-74

    1. Initial program 65.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*65.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified65.2%

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

      \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(-1 \cdot b + 1.5 \cdot \frac{a \cdot c}{b}\right)}}{3 \cdot a} \]
    5. Step-by-step derivation
      1. +-commutative81.5%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(1.5 \cdot \frac{a \cdot c}{b} + -1 \cdot b\right)}}{3 \cdot a} \]
      2. mul-1-neg81.5%

        \[\leadsto \frac{\left(-b\right) + \left(1.5 \cdot \frac{a \cdot c}{b} + \color{blue}{\left(-b\right)}\right)}{3 \cdot a} \]
      3. unsub-neg81.5%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(1.5 \cdot \frac{a \cdot c}{b} - b\right)}}{3 \cdot a} \]
      4. associate-*r/81.5%

        \[\leadsto \frac{\left(-b\right) + \left(\color{blue}{\frac{1.5 \cdot \left(a \cdot c\right)}{b}} - b\right)}{3 \cdot a} \]
      5. associate-*r*81.5%

        \[\leadsto \frac{\left(-b\right) + \left(\frac{\color{blue}{\left(1.5 \cdot a\right) \cdot c}}{b} - b\right)}{3 \cdot a} \]
    6. Simplified81.5%

      \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(\frac{\left(1.5 \cdot a\right) \cdot c}{b} - b\right)}}{3 \cdot a} \]
    7. Step-by-step derivation
      1. frac-2neg81.5%

        \[\leadsto \color{blue}{\frac{-\left(\left(-b\right) + \left(\frac{\left(1.5 \cdot a\right) \cdot c}{b} - b\right)\right)}{-3 \cdot a}} \]
      2. div-inv81.4%

        \[\leadsto \color{blue}{\left(-\left(\left(-b\right) + \left(\frac{\left(1.5 \cdot a\right) \cdot c}{b} - b\right)\right)\right) \cdot \frac{1}{-3 \cdot a}} \]
    8. Applied egg-rr84.9%

      \[\leadsto \color{blue}{\left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \cdot \frac{1}{a \cdot -3}} \]
    9. Step-by-step derivation
      1. *-commutative84.9%

        \[\leadsto \color{blue}{\frac{1}{a \cdot -3} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right)} \]
      2. *-commutative84.9%

        \[\leadsto \frac{1}{\color{blue}{-3 \cdot a}} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \]
      3. associate-/r*84.8%

        \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{a}} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \]
      4. metadata-eval84.8%

        \[\leadsto \frac{\color{blue}{-0.3333333333333333}}{a} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \]
      5. +-commutative84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \color{blue}{\left(b + \left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right)\right)} \]
      6. *-commutative84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \color{blue}{\left(1.5 \cdot \frac{a}{b}\right) \cdot c}\right)\right) \]
      7. associate-*r/84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \color{blue}{\frac{1.5 \cdot a}{b}} \cdot c\right)\right) \]
      8. *-commutative84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{\color{blue}{a \cdot 1.5}}{b} \cdot c\right)\right) \]
      9. associate-/r/84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \color{blue}{\frac{a \cdot 1.5}{\frac{b}{c}}}\right)\right) \]
    10. Simplified84.8%

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)} \]

    if -2.94999999999999983e-74 < b < 3.3000000000000001e-143

    1. Initial program 73.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*73.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified73.5%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Step-by-step derivation
      1. +-commutative73.5%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} + \left(-b\right)}}{3 \cdot a} \]
      2. unsub-neg73.5%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}}{3 \cdot a} \]
      3. *-un-lft-identity73.5%

        \[\leadsto \frac{\sqrt{\color{blue}{1 \cdot \left(b \cdot b - 3 \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      4. cancel-sign-sub-inv73.5%

        \[\leadsto \frac{\sqrt{1 \cdot \color{blue}{\left(b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      5. *-un-lft-identity73.5%

        \[\leadsto \frac{\sqrt{\color{blue}{b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)}} - b}{3 \cdot a} \]
      6. +-commutative73.5%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(-3\right) \cdot \left(a \cdot c\right) + b \cdot b}} - b}{3 \cdot a} \]
      7. metadata-eval73.5%

        \[\leadsto \frac{\sqrt{\color{blue}{-3} \cdot \left(a \cdot c\right) + b \cdot b} - b}{3 \cdot a} \]
      8. *-commutative73.5%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3} + b \cdot b} - b}{3 \cdot a} \]
      9. associate-*r*73.6%

        \[\leadsto \frac{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)} + b \cdot b} - b}{3 \cdot a} \]
      10. fma-udef73.6%

        \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}} - b}{3 \cdot a} \]
      11. div-sub73.6%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} - \frac{b}{3 \cdot a}} \]
      12. sub-neg73.6%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} + \left(-\frac{b}{3 \cdot a}\right)} \]
    5. Applied egg-rr73.6%

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} + \left(-b \cdot \frac{0.3333333333333333}{a}\right)} \]
    6. Step-by-step derivation
      1. sub-neg73.6%

        \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} - b \cdot \frac{0.3333333333333333}{a}} \]
      2. distribute-rgt-out--73.6%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    7. Simplified73.6%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    8. Step-by-step derivation
      1. *-commutative73.6%

        \[\leadsto \color{blue}{\left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right) \cdot \frac{0.3333333333333333}{a}} \]
      2. metadata-eval73.6%

        \[\leadsto \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right) \cdot \frac{\color{blue}{\frac{1}{3}}}{a} \]
      3. metadata-eval73.6%

        \[\leadsto \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right) \cdot \frac{\frac{\color{blue}{\frac{2}{2}}}{3}}{a} \]
      4. associate-/r*73.5%

        \[\leadsto \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right) \cdot \color{blue}{\frac{\frac{2}{2}}{3 \cdot a}} \]
      5. metadata-eval73.5%

        \[\leadsto \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right) \cdot \frac{\color{blue}{1}}{3 \cdot a} \]
      6. un-div-inv73.6%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b}{3 \cdot a}} \]
    9. Applied egg-rr62.9%

      \[\leadsto \color{blue}{\frac{\sqrt{a \cdot \left(c \cdot -3\right) + 0}}{a \cdot 3}} \]
    10. Step-by-step derivation
      1. *-lft-identity62.9%

        \[\leadsto \frac{\color{blue}{1 \cdot \sqrt{a \cdot \left(c \cdot -3\right) + 0}}}{a \cdot 3} \]
      2. associate-/l*63.0%

        \[\leadsto \color{blue}{\frac{1}{\frac{a \cdot 3}{\sqrt{a \cdot \left(c \cdot -3\right) + 0}}}} \]
      3. *-commutative63.0%

        \[\leadsto \frac{1}{\frac{\color{blue}{3 \cdot a}}{\sqrt{a \cdot \left(c \cdot -3\right) + 0}}} \]
      4. associate-/l*63.0%

        \[\leadsto \frac{1}{\color{blue}{\frac{3}{\frac{\sqrt{a \cdot \left(c \cdot -3\right) + 0}}{a}}}} \]
      5. associate-/r/63.0%

        \[\leadsto \color{blue}{\frac{1}{3} \cdot \frac{\sqrt{a \cdot \left(c \cdot -3\right) + 0}}{a}} \]
      6. metadata-eval63.0%

        \[\leadsto \color{blue}{0.3333333333333333} \cdot \frac{\sqrt{a \cdot \left(c \cdot -3\right) + 0}}{a} \]
      7. +-rgt-identity63.0%

        \[\leadsto 0.3333333333333333 \cdot \frac{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}}}{a} \]
    11. Simplified63.0%

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

    if 3.3000000000000001e-143 < b

    1. Initial program 14.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*14.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified14.5%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    5. Step-by-step derivation
      1. associate-*r/87.8%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
    6. Simplified87.8%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification80.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -2.95 \cdot 10^{-74}:\\ \;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{-143}:\\ \;\;\;\;0.3333333333333333 \cdot \frac{\sqrt{a \cdot \left(c \cdot -3\right)}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

Alternative 6: 80.0% accurate, 1.0× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -1.55 \cdot 10^{-73}:\\ \;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{-143}:\\ \;\;\;\;\frac{0.3333333333333333}{a} \cdot \sqrt{a \cdot \left(c \cdot -3\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -1.55e-73)
   (* (/ -0.3333333333333333 a) (+ b (- b (/ (* a 1.5) (/ b c)))))
   (if (<= b 3.3e-143)
     (* (/ 0.3333333333333333 a) (sqrt (* a (* c -3.0))))
     (/ (* c -0.5) b))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -1.55e-73) {
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))));
	} else if (b <= 3.3e-143) {
		tmp = (0.3333333333333333 / a) * sqrt((a * (c * -3.0)));
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-1.55d-73)) then
        tmp = ((-0.3333333333333333d0) / a) * (b + (b - ((a * 1.5d0) / (b / c))))
    else if (b <= 3.3d-143) then
        tmp = (0.3333333333333333d0 / a) * sqrt((a * (c * (-3.0d0))))
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -1.55e-73) {
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))));
	} else if (b <= 3.3e-143) {
		tmp = (0.3333333333333333 / a) * Math.sqrt((a * (c * -3.0)));
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -1.55e-73:
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))))
	elif b <= 3.3e-143:
		tmp = (0.3333333333333333 / a) * math.sqrt((a * (c * -3.0)))
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -1.55e-73)
		tmp = Float64(Float64(-0.3333333333333333 / a) * Float64(b + Float64(b - Float64(Float64(a * 1.5) / Float64(b / c)))));
	elseif (b <= 3.3e-143)
		tmp = Float64(Float64(0.3333333333333333 / a) * sqrt(Float64(a * Float64(c * -3.0))));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -1.55e-73)
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))));
	elseif (b <= 3.3e-143)
		tmp = (0.3333333333333333 / a) * sqrt((a * (c * -3.0)));
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -1.55e-73], N[(N[(-0.3333333333333333 / a), $MachinePrecision] * N[(b + N[(b - N[(N[(a * 1.5), $MachinePrecision] / N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], If[LessEqual[b, 3.3e-143], N[(N[(0.3333333333333333 / a), $MachinePrecision] * N[Sqrt[N[(a * N[(c * -3.0), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -1.55 \cdot 10^{-73}:\\
\;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)\\

\mathbf{elif}\;b \leq 3.3 \cdot 10^{-143}:\\
\;\;\;\;\frac{0.3333333333333333}{a} \cdot \sqrt{a \cdot \left(c \cdot -3\right)}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 3 regimes
  2. if b < -1.54999999999999985e-73

    1. Initial program 65.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*65.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified65.2%

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

      \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(-1 \cdot b + 1.5 \cdot \frac{a \cdot c}{b}\right)}}{3 \cdot a} \]
    5. Step-by-step derivation
      1. +-commutative81.5%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(1.5 \cdot \frac{a \cdot c}{b} + -1 \cdot b\right)}}{3 \cdot a} \]
      2. mul-1-neg81.5%

        \[\leadsto \frac{\left(-b\right) + \left(1.5 \cdot \frac{a \cdot c}{b} + \color{blue}{\left(-b\right)}\right)}{3 \cdot a} \]
      3. unsub-neg81.5%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(1.5 \cdot \frac{a \cdot c}{b} - b\right)}}{3 \cdot a} \]
      4. associate-*r/81.5%

        \[\leadsto \frac{\left(-b\right) + \left(\color{blue}{\frac{1.5 \cdot \left(a \cdot c\right)}{b}} - b\right)}{3 \cdot a} \]
      5. associate-*r*81.5%

        \[\leadsto \frac{\left(-b\right) + \left(\frac{\color{blue}{\left(1.5 \cdot a\right) \cdot c}}{b} - b\right)}{3 \cdot a} \]
    6. Simplified81.5%

      \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(\frac{\left(1.5 \cdot a\right) \cdot c}{b} - b\right)}}{3 \cdot a} \]
    7. Step-by-step derivation
      1. frac-2neg81.5%

        \[\leadsto \color{blue}{\frac{-\left(\left(-b\right) + \left(\frac{\left(1.5 \cdot a\right) \cdot c}{b} - b\right)\right)}{-3 \cdot a}} \]
      2. div-inv81.4%

        \[\leadsto \color{blue}{\left(-\left(\left(-b\right) + \left(\frac{\left(1.5 \cdot a\right) \cdot c}{b} - b\right)\right)\right) \cdot \frac{1}{-3 \cdot a}} \]
    8. Applied egg-rr84.9%

      \[\leadsto \color{blue}{\left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \cdot \frac{1}{a \cdot -3}} \]
    9. Step-by-step derivation
      1. *-commutative84.9%

        \[\leadsto \color{blue}{\frac{1}{a \cdot -3} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right)} \]
      2. *-commutative84.9%

        \[\leadsto \frac{1}{\color{blue}{-3 \cdot a}} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \]
      3. associate-/r*84.8%

        \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{a}} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \]
      4. metadata-eval84.8%

        \[\leadsto \frac{\color{blue}{-0.3333333333333333}}{a} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \]
      5. +-commutative84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \color{blue}{\left(b + \left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right)\right)} \]
      6. *-commutative84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \color{blue}{\left(1.5 \cdot \frac{a}{b}\right) \cdot c}\right)\right) \]
      7. associate-*r/84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \color{blue}{\frac{1.5 \cdot a}{b}} \cdot c\right)\right) \]
      8. *-commutative84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{\color{blue}{a \cdot 1.5}}{b} \cdot c\right)\right) \]
      9. associate-/r/84.8%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \color{blue}{\frac{a \cdot 1.5}{\frac{b}{c}}}\right)\right) \]
    10. Simplified84.8%

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)} \]

    if -1.54999999999999985e-73 < b < 3.3000000000000001e-143

    1. Initial program 73.7%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*73.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified73.5%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Step-by-step derivation
      1. +-commutative73.5%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} + \left(-b\right)}}{3 \cdot a} \]
      2. unsub-neg73.5%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}}{3 \cdot a} \]
      3. *-un-lft-identity73.5%

        \[\leadsto \frac{\sqrt{\color{blue}{1 \cdot \left(b \cdot b - 3 \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      4. cancel-sign-sub-inv73.5%

        \[\leadsto \frac{\sqrt{1 \cdot \color{blue}{\left(b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      5. *-un-lft-identity73.5%

        \[\leadsto \frac{\sqrt{\color{blue}{b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)}} - b}{3 \cdot a} \]
      6. +-commutative73.5%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(-3\right) \cdot \left(a \cdot c\right) + b \cdot b}} - b}{3 \cdot a} \]
      7. metadata-eval73.5%

        \[\leadsto \frac{\sqrt{\color{blue}{-3} \cdot \left(a \cdot c\right) + b \cdot b} - b}{3 \cdot a} \]
      8. *-commutative73.5%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3} + b \cdot b} - b}{3 \cdot a} \]
      9. associate-*r*73.6%

        \[\leadsto \frac{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)} + b \cdot b} - b}{3 \cdot a} \]
      10. fma-udef73.6%

        \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}} - b}{3 \cdot a} \]
      11. div-sub73.6%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} - \frac{b}{3 \cdot a}} \]
      12. sub-neg73.6%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} + \left(-\frac{b}{3 \cdot a}\right)} \]
    5. Applied egg-rr73.6%

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} + \left(-b \cdot \frac{0.3333333333333333}{a}\right)} \]
    6. Step-by-step derivation
      1. sub-neg73.6%

        \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} - b \cdot \frac{0.3333333333333333}{a}} \]
      2. distribute-rgt-out--73.6%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    7. Simplified73.6%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    8. Applied egg-rr63.0%

      \[\leadsto \frac{0.3333333333333333}{a} \cdot \color{blue}{\left(\sqrt{a \cdot \left(c \cdot -3\right) + 0} + 0\right)} \]
    9. Step-by-step derivation
      1. +-rgt-identity63.0%

        \[\leadsto \frac{0.3333333333333333}{a} \cdot \left(\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)}} + 0\right) \]
      2. +-rgt-identity63.0%

        \[\leadsto \frac{0.3333333333333333}{a} \cdot \color{blue}{\sqrt{a \cdot \left(c \cdot -3\right)}} \]
    10. Simplified63.0%

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

    if 3.3000000000000001e-143 < b

    1. Initial program 14.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*14.5%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified14.5%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    5. Step-by-step derivation
      1. associate-*r/87.8%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
    6. Simplified87.8%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
  3. Recombined 3 regimes into one program.
  4. Final simplification80.9%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -1.55 \cdot 10^{-73}:\\ \;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)\\ \mathbf{elif}\;b \leq 3.3 \cdot 10^{-143}:\\ \;\;\;\;\frac{0.3333333333333333}{a} \cdot \sqrt{a \cdot \left(c \cdot -3\right)}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

Alternative 7: 67.9% accurate, 6.8× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -5e-310)
   (* (/ -0.3333333333333333 a) (+ b (- b (/ (* a 1.5) (/ b c)))))
   (/ (* c -0.5) b)))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -5e-310) {
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))));
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-5d-310)) then
        tmp = ((-0.3333333333333333d0) / a) * (b + (b - ((a * 1.5d0) / (b / c))))
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -5e-310) {
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))));
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -5e-310:
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))))
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -5e-310)
		tmp = Float64(Float64(-0.3333333333333333 / a) * Float64(b + Float64(b - Float64(Float64(a * 1.5) / Float64(b / c)))));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -5e-310)
		tmp = (-0.3333333333333333 / a) * (b + (b - ((a * 1.5) / (b / c))));
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -5e-310], N[(N[(-0.3333333333333333 / a), $MachinePrecision] * N[(b + N[(b - N[(N[(a * 1.5), $MachinePrecision] / N[(b / c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.999999999999985e-310

    1. Initial program 68.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*68.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified68.4%

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

      \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(-1 \cdot b + 1.5 \cdot \frac{a \cdot c}{b}\right)}}{3 \cdot a} \]
    5. Step-by-step derivation
      1. +-commutative67.8%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(1.5 \cdot \frac{a \cdot c}{b} + -1 \cdot b\right)}}{3 \cdot a} \]
      2. mul-1-neg67.8%

        \[\leadsto \frac{\left(-b\right) + \left(1.5 \cdot \frac{a \cdot c}{b} + \color{blue}{\left(-b\right)}\right)}{3 \cdot a} \]
      3. unsub-neg67.8%

        \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(1.5 \cdot \frac{a \cdot c}{b} - b\right)}}{3 \cdot a} \]
      4. associate-*r/67.8%

        \[\leadsto \frac{\left(-b\right) + \left(\color{blue}{\frac{1.5 \cdot \left(a \cdot c\right)}{b}} - b\right)}{3 \cdot a} \]
      5. associate-*r*67.8%

        \[\leadsto \frac{\left(-b\right) + \left(\frac{\color{blue}{\left(1.5 \cdot a\right) \cdot c}}{b} - b\right)}{3 \cdot a} \]
    6. Simplified67.8%

      \[\leadsto \frac{\left(-b\right) + \color{blue}{\left(\frac{\left(1.5 \cdot a\right) \cdot c}{b} - b\right)}}{3 \cdot a} \]
    7. Step-by-step derivation
      1. frac-2neg67.8%

        \[\leadsto \color{blue}{\frac{-\left(\left(-b\right) + \left(\frac{\left(1.5 \cdot a\right) \cdot c}{b} - b\right)\right)}{-3 \cdot a}} \]
      2. div-inv67.7%

        \[\leadsto \color{blue}{\left(-\left(\left(-b\right) + \left(\frac{\left(1.5 \cdot a\right) \cdot c}{b} - b\right)\right)\right) \cdot \frac{1}{-3 \cdot a}} \]
    8. Applied egg-rr70.5%

      \[\leadsto \color{blue}{\left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \cdot \frac{1}{a \cdot -3}} \]
    9. Step-by-step derivation
      1. *-commutative70.5%

        \[\leadsto \color{blue}{\frac{1}{a \cdot -3} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right)} \]
      2. *-commutative70.5%

        \[\leadsto \frac{1}{\color{blue}{-3 \cdot a}} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \]
      3. associate-/r*70.5%

        \[\leadsto \color{blue}{\frac{\frac{1}{-3}}{a}} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \]
      4. metadata-eval70.5%

        \[\leadsto \frac{\color{blue}{-0.3333333333333333}}{a} \cdot \left(\left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right) + b\right) \]
      5. +-commutative70.5%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \color{blue}{\left(b + \left(b - c \cdot \left(1.5 \cdot \frac{a}{b}\right)\right)\right)} \]
      6. *-commutative70.5%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \color{blue}{\left(1.5 \cdot \frac{a}{b}\right) \cdot c}\right)\right) \]
      7. associate-*r/70.5%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \color{blue}{\frac{1.5 \cdot a}{b}} \cdot c\right)\right) \]
      8. *-commutative70.5%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{\color{blue}{a \cdot 1.5}}{b} \cdot c\right)\right) \]
      9. associate-/r/70.5%

        \[\leadsto \frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \color{blue}{\frac{a \cdot 1.5}{\frac{b}{c}}}\right)\right) \]
    10. Simplified70.5%

      \[\leadsto \color{blue}{\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)} \]

    if -4.999999999999985e-310 < b

    1. Initial program 26.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*26.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified26.2%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    5. Step-by-step derivation
      1. associate-*r/70.9%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
    6. Simplified70.9%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{-0.3333333333333333}{a} \cdot \left(b + \left(b - \frac{a \cdot 1.5}{\frac{b}{c}}\right)\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

Alternative 8: 68.0% accurate, 8.9× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -5e-310)
   (+ (* -0.6666666666666666 (/ b a)) (* 0.5 (/ c b)))
   (/ (* c -0.5) b)))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -5e-310) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-5d-310)) then
        tmp = ((-0.6666666666666666d0) * (b / a)) + (0.5d0 * (c / b))
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -5e-310) {
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -5e-310:
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b))
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -5e-310)
		tmp = Float64(Float64(-0.6666666666666666 * Float64(b / a)) + Float64(0.5 * Float64(c / b)));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -5e-310)
		tmp = (-0.6666666666666666 * (b / a)) + (0.5 * (c / b));
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -5e-310], N[(N[(-0.6666666666666666 * N[(b / a), $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\
\;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.999999999999985e-310

    1. Initial program 68.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*68.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified68.4%

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

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}} \]

    if -4.999999999999985e-310 < b

    1. Initial program 26.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*26.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified26.2%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    5. Step-by-step derivation
      1. associate-*r/70.9%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
    6. Simplified70.9%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.7%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;-0.6666666666666666 \cdot \frac{b}{a} + 0.5 \cdot \frac{c}{b}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

Alternative 9: 67.4% accurate, 16.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.5}{\frac{b}{c}}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -5e-310) (* b (/ -0.6666666666666666 a)) (/ -0.5 (/ b c))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -5e-310) {
		tmp = b * (-0.6666666666666666 / a);
	} else {
		tmp = -0.5 / (b / c);
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-5d-310)) then
        tmp = b * ((-0.6666666666666666d0) / a)
    else
        tmp = (-0.5d0) / (b / c)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -5e-310) {
		tmp = b * (-0.6666666666666666 / a);
	} else {
		tmp = -0.5 / (b / c);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -5e-310:
		tmp = b * (-0.6666666666666666 / a)
	else:
		tmp = -0.5 / (b / c)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -5e-310)
		tmp = Float64(b * Float64(-0.6666666666666666 / a));
	else
		tmp = Float64(-0.5 / Float64(b / c));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -5e-310)
		tmp = b * (-0.6666666666666666 / a);
	else
		tmp = -0.5 / (b / c);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -5e-310], N[(b * N[(-0.6666666666666666 / a), $MachinePrecision]), $MachinePrecision], N[(-0.5 / N[(b / c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\
\;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\

\mathbf{else}:\\
\;\;\;\;\frac{-0.5}{\frac{b}{c}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.999999999999985e-310

    1. Initial program 68.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*68.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified68.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Step-by-step derivation
      1. +-commutative68.4%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} + \left(-b\right)}}{3 \cdot a} \]
      2. unsub-neg68.4%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}}{3 \cdot a} \]
      3. *-un-lft-identity68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{1 \cdot \left(b \cdot b - 3 \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      4. cancel-sign-sub-inv68.4%

        \[\leadsto \frac{\sqrt{1 \cdot \color{blue}{\left(b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      5. *-un-lft-identity68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)}} - b}{3 \cdot a} \]
      6. +-commutative68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(-3\right) \cdot \left(a \cdot c\right) + b \cdot b}} - b}{3 \cdot a} \]
      7. metadata-eval68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{-3} \cdot \left(a \cdot c\right) + b \cdot b} - b}{3 \cdot a} \]
      8. *-commutative68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3} + b \cdot b} - b}{3 \cdot a} \]
      9. associate-*r*68.5%

        \[\leadsto \frac{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)} + b \cdot b} - b}{3 \cdot a} \]
      10. fma-udef68.5%

        \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}} - b}{3 \cdot a} \]
      11. div-sub68.5%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} - \frac{b}{3 \cdot a}} \]
      12. sub-neg68.5%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} + \left(-\frac{b}{3 \cdot a}\right)} \]
    5. Applied egg-rr68.5%

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} + \left(-b \cdot \frac{0.3333333333333333}{a}\right)} \]
    6. Step-by-step derivation
      1. sub-neg68.5%

        \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} - b \cdot \frac{0.3333333333333333}{a}} \]
      2. distribute-rgt-out--68.5%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    7. Simplified68.5%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    8. Taylor expanded in b around -inf 69.6%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    9. Step-by-step derivation
      1. associate-*r/69.7%

        \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} \]
      2. associate-*l/69.7%

        \[\leadsto \color{blue}{\frac{-0.6666666666666666}{a} \cdot b} \]
      3. *-commutative69.7%

        \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    10. Simplified69.7%

      \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]

    if -4.999999999999985e-310 < b

    1. Initial program 26.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*26.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified26.2%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    5. Step-by-step derivation
      1. associate-*r/70.9%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
      2. associate-/l*70.3%

        \[\leadsto \color{blue}{\frac{-0.5}{\frac{b}{c}}} \]
    6. Simplified70.3%

      \[\leadsto \color{blue}{\frac{-0.5}{\frac{b}{c}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;b \cdot \frac{-0.6666666666666666}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.5}{\frac{b}{c}}\\ \end{array} \]

Alternative 10: 67.4% accurate, 16.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{b}{a \cdot -1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.5}{\frac{b}{c}}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -5e-310) (/ b (* a -1.5)) (/ -0.5 (/ b c))))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -5e-310) {
		tmp = b / (a * -1.5);
	} else {
		tmp = -0.5 / (b / c);
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-5d-310)) then
        tmp = b / (a * (-1.5d0))
    else
        tmp = (-0.5d0) / (b / c)
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -5e-310) {
		tmp = b / (a * -1.5);
	} else {
		tmp = -0.5 / (b / c);
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -5e-310:
		tmp = b / (a * -1.5)
	else:
		tmp = -0.5 / (b / c)
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -5e-310)
		tmp = Float64(b / Float64(a * -1.5));
	else
		tmp = Float64(-0.5 / Float64(b / c));
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -5e-310)
		tmp = b / (a * -1.5);
	else
		tmp = -0.5 / (b / c);
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -5e-310], N[(b / N[(a * -1.5), $MachinePrecision]), $MachinePrecision], N[(-0.5 / N[(b / c), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{b}{a \cdot -1.5}\\

\mathbf{else}:\\
\;\;\;\;\frac{-0.5}{\frac{b}{c}}\\


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.999999999999985e-310

    1. Initial program 68.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*68.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified68.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Step-by-step derivation
      1. +-commutative68.4%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} + \left(-b\right)}}{3 \cdot a} \]
      2. unsub-neg68.4%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}}{3 \cdot a} \]
      3. *-un-lft-identity68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{1 \cdot \left(b \cdot b - 3 \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      4. cancel-sign-sub-inv68.4%

        \[\leadsto \frac{\sqrt{1 \cdot \color{blue}{\left(b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      5. *-un-lft-identity68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)}} - b}{3 \cdot a} \]
      6. +-commutative68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(-3\right) \cdot \left(a \cdot c\right) + b \cdot b}} - b}{3 \cdot a} \]
      7. metadata-eval68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{-3} \cdot \left(a \cdot c\right) + b \cdot b} - b}{3 \cdot a} \]
      8. *-commutative68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3} + b \cdot b} - b}{3 \cdot a} \]
      9. associate-*r*68.5%

        \[\leadsto \frac{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)} + b \cdot b} - b}{3 \cdot a} \]
      10. fma-udef68.5%

        \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}} - b}{3 \cdot a} \]
      11. div-sub68.5%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} - \frac{b}{3 \cdot a}} \]
      12. sub-neg68.5%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} + \left(-\frac{b}{3 \cdot a}\right)} \]
    5. Applied egg-rr68.5%

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} + \left(-b \cdot \frac{0.3333333333333333}{a}\right)} \]
    6. Step-by-step derivation
      1. sub-neg68.5%

        \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} - b \cdot \frac{0.3333333333333333}{a}} \]
      2. distribute-rgt-out--68.5%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    7. Simplified68.5%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    8. Taylor expanded in b around -inf 69.6%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    9. Step-by-step derivation
      1. associate-*r/69.7%

        \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} \]
      2. associate-*l/69.7%

        \[\leadsto \color{blue}{\frac{-0.6666666666666666}{a} \cdot b} \]
      3. *-commutative69.7%

        \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    10. Simplified69.7%

      \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    11. Step-by-step derivation
      1. associate-*r/69.7%

        \[\leadsto \color{blue}{\frac{b \cdot -0.6666666666666666}{a}} \]
      2. associate-/l*69.6%

        \[\leadsto \color{blue}{\frac{b}{\frac{a}{-0.6666666666666666}}} \]
      3. div-inv69.8%

        \[\leadsto \frac{b}{\color{blue}{a \cdot \frac{1}{-0.6666666666666666}}} \]
      4. metadata-eval69.8%

        \[\leadsto \frac{b}{a \cdot \color{blue}{-1.5}} \]
    12. Applied egg-rr69.8%

      \[\leadsto \color{blue}{\frac{b}{a \cdot -1.5}} \]

    if -4.999999999999985e-310 < b

    1. Initial program 26.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*26.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified26.2%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    5. Step-by-step derivation
      1. associate-*r/70.9%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
      2. associate-/l*70.3%

        \[\leadsto \color{blue}{\frac{-0.5}{\frac{b}{c}}} \]
    6. Simplified70.3%

      \[\leadsto \color{blue}{\frac{-0.5}{\frac{b}{c}}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.1%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{b}{a \cdot -1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{-0.5}{\frac{b}{c}}\\ \end{array} \]

Alternative 11: 67.8% accurate, 16.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{b}{a \cdot -1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -5e-310) (/ b (* a -1.5)) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -5e-310) {
		tmp = b / (a * -1.5);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-5d-310)) then
        tmp = b / (a * (-1.5d0))
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -5e-310) {
		tmp = b / (a * -1.5);
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -5e-310:
		tmp = b / (a * -1.5)
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -5e-310)
		tmp = Float64(b / Float64(a * -1.5));
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -5e-310)
		tmp = b / (a * -1.5);
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -5e-310], N[(b / N[(a * -1.5), $MachinePrecision]), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{b}{a \cdot -1.5}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.999999999999985e-310

    1. Initial program 68.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*68.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified68.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Step-by-step derivation
      1. +-commutative68.4%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} + \left(-b\right)}}{3 \cdot a} \]
      2. unsub-neg68.4%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}}{3 \cdot a} \]
      3. *-un-lft-identity68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{1 \cdot \left(b \cdot b - 3 \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      4. cancel-sign-sub-inv68.4%

        \[\leadsto \frac{\sqrt{1 \cdot \color{blue}{\left(b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      5. *-un-lft-identity68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)}} - b}{3 \cdot a} \]
      6. +-commutative68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(-3\right) \cdot \left(a \cdot c\right) + b \cdot b}} - b}{3 \cdot a} \]
      7. metadata-eval68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{-3} \cdot \left(a \cdot c\right) + b \cdot b} - b}{3 \cdot a} \]
      8. *-commutative68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3} + b \cdot b} - b}{3 \cdot a} \]
      9. associate-*r*68.5%

        \[\leadsto \frac{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)} + b \cdot b} - b}{3 \cdot a} \]
      10. fma-udef68.5%

        \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}} - b}{3 \cdot a} \]
      11. div-sub68.5%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} - \frac{b}{3 \cdot a}} \]
      12. sub-neg68.5%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} + \left(-\frac{b}{3 \cdot a}\right)} \]
    5. Applied egg-rr68.5%

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} + \left(-b \cdot \frac{0.3333333333333333}{a}\right)} \]
    6. Step-by-step derivation
      1. sub-neg68.5%

        \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} - b \cdot \frac{0.3333333333333333}{a}} \]
      2. distribute-rgt-out--68.5%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    7. Simplified68.5%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    8. Taylor expanded in b around -inf 69.6%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    9. Step-by-step derivation
      1. associate-*r/69.7%

        \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} \]
      2. associate-*l/69.7%

        \[\leadsto \color{blue}{\frac{-0.6666666666666666}{a} \cdot b} \]
      3. *-commutative69.7%

        \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    10. Simplified69.7%

      \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    11. Step-by-step derivation
      1. associate-*r/69.7%

        \[\leadsto \color{blue}{\frac{b \cdot -0.6666666666666666}{a}} \]
      2. associate-/l*69.6%

        \[\leadsto \color{blue}{\frac{b}{\frac{a}{-0.6666666666666666}}} \]
      3. div-inv69.8%

        \[\leadsto \frac{b}{\color{blue}{a \cdot \frac{1}{-0.6666666666666666}}} \]
      4. metadata-eval69.8%

        \[\leadsto \frac{b}{a \cdot \color{blue}{-1.5}} \]
    12. Applied egg-rr69.8%

      \[\leadsto \color{blue}{\frac{b}{a \cdot -1.5}} \]

    if -4.999999999999985e-310 < b

    1. Initial program 26.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*26.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified26.2%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    5. Step-by-step derivation
      1. associate-*r/70.9%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
    6. Simplified70.9%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{b}{a \cdot -1.5}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

Alternative 12: 67.9% accurate, 16.4× speedup?

\[\begin{array}{l} \\ \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{\frac{b}{-1.5}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (if (<= b -5e-310) (/ (/ b -1.5) a) (/ (* c -0.5) b)))
double code(double a, double b, double c) {
	double tmp;
	if (b <= -5e-310) {
		tmp = (b / -1.5) / a;
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: tmp
    if (b <= (-5d-310)) then
        tmp = (b / (-1.5d0)) / a
    else
        tmp = (c * (-0.5d0)) / b
    end if
    code = tmp
end function
public static double code(double a, double b, double c) {
	double tmp;
	if (b <= -5e-310) {
		tmp = (b / -1.5) / a;
	} else {
		tmp = (c * -0.5) / b;
	}
	return tmp;
}
def code(a, b, c):
	tmp = 0
	if b <= -5e-310:
		tmp = (b / -1.5) / a
	else:
		tmp = (c * -0.5) / b
	return tmp
function code(a, b, c)
	tmp = 0.0
	if (b <= -5e-310)
		tmp = Float64(Float64(b / -1.5) / a);
	else
		tmp = Float64(Float64(c * -0.5) / b);
	end
	return tmp
end
function tmp_2 = code(a, b, c)
	tmp = 0.0;
	if (b <= -5e-310)
		tmp = (b / -1.5) / a;
	else
		tmp = (c * -0.5) / b;
	end
	tmp_2 = tmp;
end
code[a_, b_, c_] := If[LessEqual[b, -5e-310], N[(N[(b / -1.5), $MachinePrecision] / a), $MachinePrecision], N[(N[(c * -0.5), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
\mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\
\;\;\;\;\frac{\frac{b}{-1.5}}{a}\\

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


\end{array}
\end{array}
Derivation
  1. Split input into 2 regimes
  2. if b < -4.999999999999985e-310

    1. Initial program 68.5%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*68.4%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified68.4%

      \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
    4. Step-by-step derivation
      1. +-commutative68.4%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} + \left(-b\right)}}{3 \cdot a} \]
      2. unsub-neg68.4%

        \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}}{3 \cdot a} \]
      3. *-un-lft-identity68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{1 \cdot \left(b \cdot b - 3 \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      4. cancel-sign-sub-inv68.4%

        \[\leadsto \frac{\sqrt{1 \cdot \color{blue}{\left(b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
      5. *-un-lft-identity68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)}} - b}{3 \cdot a} \]
      6. +-commutative68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(-3\right) \cdot \left(a \cdot c\right) + b \cdot b}} - b}{3 \cdot a} \]
      7. metadata-eval68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{-3} \cdot \left(a \cdot c\right) + b \cdot b} - b}{3 \cdot a} \]
      8. *-commutative68.4%

        \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3} + b \cdot b} - b}{3 \cdot a} \]
      9. associate-*r*68.5%

        \[\leadsto \frac{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)} + b \cdot b} - b}{3 \cdot a} \]
      10. fma-udef68.5%

        \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}} - b}{3 \cdot a} \]
      11. div-sub68.5%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} - \frac{b}{3 \cdot a}} \]
      12. sub-neg68.5%

        \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} + \left(-\frac{b}{3 \cdot a}\right)} \]
    5. Applied egg-rr68.5%

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} + \left(-b \cdot \frac{0.3333333333333333}{a}\right)} \]
    6. Step-by-step derivation
      1. sub-neg68.5%

        \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} - b \cdot \frac{0.3333333333333333}{a}} \]
      2. distribute-rgt-out--68.5%

        \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    7. Simplified68.5%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
    8. Taylor expanded in b around -inf 69.6%

      \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
    9. Step-by-step derivation
      1. associate-*r/69.7%

        \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} \]
      2. associate-*l/69.7%

        \[\leadsto \color{blue}{\frac{-0.6666666666666666}{a} \cdot b} \]
      3. *-commutative69.7%

        \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    10. Simplified69.7%

      \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
    11. Step-by-step derivation
      1. associate-*r/69.7%

        \[\leadsto \color{blue}{\frac{b \cdot -0.6666666666666666}{a}} \]
      2. associate-/l*69.6%

        \[\leadsto \color{blue}{\frac{b}{\frac{a}{-0.6666666666666666}}} \]
      3. metadata-eval69.6%

        \[\leadsto \frac{b}{\frac{a}{\color{blue}{\frac{-2}{3}}}} \]
      4. associate-/l*69.8%

        \[\leadsto \frac{b}{\color{blue}{\frac{a \cdot 3}{-2}}} \]
      5. *-commutative69.8%

        \[\leadsto \frac{b}{\frac{\color{blue}{3 \cdot a}}{-2}} \]
      6. associate-/l*69.8%

        \[\leadsto \color{blue}{\frac{b \cdot -2}{3 \cdot a}} \]
      7. associate-/r*69.8%

        \[\leadsto \color{blue}{\frac{\frac{b \cdot -2}{3}}{a}} \]
      8. associate-/l*69.8%

        \[\leadsto \frac{\color{blue}{\frac{b}{\frac{3}{-2}}}}{a} \]
      9. metadata-eval69.8%

        \[\leadsto \frac{\frac{b}{\color{blue}{-1.5}}}{a} \]
    12. Applied egg-rr69.8%

      \[\leadsto \color{blue}{\frac{\frac{b}{-1.5}}{a}} \]

    if -4.999999999999985e-310 < b

    1. Initial program 26.2%

      \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
    2. Step-by-step derivation
      1. associate-*l*26.2%

        \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
    3. Simplified26.2%

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

      \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
    5. Step-by-step derivation
      1. associate-*r/70.9%

        \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
    6. Simplified70.9%

      \[\leadsto \color{blue}{\frac{-0.5 \cdot c}{b}} \]
  3. Recombined 2 regimes into one program.
  4. Final simplification70.4%

    \[\leadsto \begin{array}{l} \mathbf{if}\;b \leq -5 \cdot 10^{-310}:\\ \;\;\;\;\frac{\frac{b}{-1.5}}{a}\\ \mathbf{else}:\\ \;\;\;\;\frac{c \cdot -0.5}{b}\\ \end{array} \]

Alternative 13: 35.2% accurate, 23.2× speedup?

\[\begin{array}{l} \\ b \cdot \frac{-0.6666666666666666}{a} \end{array} \]
(FPCore (a b c) :precision binary64 (* b (/ -0.6666666666666666 a)))
double code(double a, double b, double c) {
	return b * (-0.6666666666666666 / a);
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = b * ((-0.6666666666666666d0) / a)
end function
public static double code(double a, double b, double c) {
	return b * (-0.6666666666666666 / a);
}
def code(a, b, c):
	return b * (-0.6666666666666666 / a)
function code(a, b, c)
	return Float64(b * Float64(-0.6666666666666666 / a))
end
function tmp = code(a, b, c)
	tmp = b * (-0.6666666666666666 / a);
end
code[a_, b_, c_] := N[(b * N[(-0.6666666666666666 / a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
b \cdot \frac{-0.6666666666666666}{a}
\end{array}
Derivation
  1. Initial program 46.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Step-by-step derivation
    1. associate-*l*46.0%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{3 \cdot \left(a \cdot c\right)}}}{3 \cdot a} \]
  3. Simplified46.0%

    \[\leadsto \color{blue}{\frac{\left(-b\right) + \sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)}}{3 \cdot a}} \]
  4. Step-by-step derivation
    1. +-commutative46.0%

      \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} + \left(-b\right)}}{3 \cdot a} \]
    2. unsub-neg46.0%

      \[\leadsto \frac{\color{blue}{\sqrt{b \cdot b - 3 \cdot \left(a \cdot c\right)} - b}}{3 \cdot a} \]
    3. *-un-lft-identity46.0%

      \[\leadsto \frac{\sqrt{\color{blue}{1 \cdot \left(b \cdot b - 3 \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
    4. cancel-sign-sub-inv46.0%

      \[\leadsto \frac{\sqrt{1 \cdot \color{blue}{\left(b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)\right)}} - b}{3 \cdot a} \]
    5. *-un-lft-identity46.0%

      \[\leadsto \frac{\sqrt{\color{blue}{b \cdot b + \left(-3\right) \cdot \left(a \cdot c\right)}} - b}{3 \cdot a} \]
    6. +-commutative46.0%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(-3\right) \cdot \left(a \cdot c\right) + b \cdot b}} - b}{3 \cdot a} \]
    7. metadata-eval46.0%

      \[\leadsto \frac{\sqrt{\color{blue}{-3} \cdot \left(a \cdot c\right) + b \cdot b} - b}{3 \cdot a} \]
    8. *-commutative46.0%

      \[\leadsto \frac{\sqrt{\color{blue}{\left(a \cdot c\right) \cdot -3} + b \cdot b} - b}{3 \cdot a} \]
    9. associate-*r*46.0%

      \[\leadsto \frac{\sqrt{\color{blue}{a \cdot \left(c \cdot -3\right)} + b \cdot b} - b}{3 \cdot a} \]
    10. fma-udef46.0%

      \[\leadsto \frac{\sqrt{\color{blue}{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}} - b}{3 \cdot a} \]
    11. div-sub45.5%

      \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} - \frac{b}{3 \cdot a}} \]
    12. sub-neg45.5%

      \[\leadsto \color{blue}{\frac{\sqrt{\mathsf{fma}\left(a, c \cdot -3, b \cdot b\right)}}{3 \cdot a} + \left(-\frac{b}{3 \cdot a}\right)} \]
  5. Applied egg-rr45.5%

    \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} + \left(-b \cdot \frac{0.3333333333333333}{a}\right)} \]
  6. Step-by-step derivation
    1. sub-neg45.5%

      \[\leadsto \color{blue}{\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} \cdot \frac{0.3333333333333333}{a} - b \cdot \frac{0.3333333333333333}{a}} \]
    2. distribute-rgt-out--46.0%

      \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
  7. Simplified46.0%

    \[\leadsto \color{blue}{\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(a, c \cdot -3, {b}^{2}\right)} - b\right)} \]
  8. Taylor expanded in b around -inf 34.0%

    \[\leadsto \color{blue}{-0.6666666666666666 \cdot \frac{b}{a}} \]
  9. Step-by-step derivation
    1. associate-*r/34.1%

      \[\leadsto \color{blue}{\frac{-0.6666666666666666 \cdot b}{a}} \]
    2. associate-*l/34.1%

      \[\leadsto \color{blue}{\frac{-0.6666666666666666}{a} \cdot b} \]
    3. *-commutative34.1%

      \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
  10. Simplified34.1%

    \[\leadsto \color{blue}{b \cdot \frac{-0.6666666666666666}{a}} \]
  11. Final simplification34.1%

    \[\leadsto b \cdot \frac{-0.6666666666666666}{a} \]

Reproduce

?
herbie shell --seed 2023301 
(FPCore (a b c)
  :name "Cubic critical"
  :precision binary64
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))