Cubic critical, medium range

Percentage Accurate: 31.0% → 95.6%
Time: 7.4s
Alternatives: 12
Speedup: 3.2×

Specification

?
\[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
(FPCore (a b c)
  :precision binary64
  :pre (and (and (and (< 1.1102230246251565e-16 a)
               (< a 9007199254740992.0))
          (and (< 1.1102230246251565e-16 b)
               (< b 9007199254740992.0)))
     (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
  (/ (+ (- 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)
use fmin_fmax_functions
    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]
f(a, b, c):
	a in [11102230246251565404236316680908203125e-53, 9007199254740992],
	b in [11102230246251565404236316680908203125e-53, 9007199254740992],
	c in [11102230246251565404236316680908203125e-53, 9007199254740992]
code: THEORY
BEGIN
f(a, b, c: real): real =
	((- b) + (sqrt(((b * b) - (((3) * a) * c))))) / ((3) * a)
END code
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}

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 12 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: 31.0% accurate, 1.0× speedup?

\[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
(FPCore (a b c)
  :precision binary64
  :pre (and (and (and (< 1.1102230246251565e-16 a)
               (< a 9007199254740992.0))
          (and (< 1.1102230246251565e-16 b)
               (< b 9007199254740992.0)))
     (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
  (/ (+ (- 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)
use fmin_fmax_functions
    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]
f(a, b, c):
	a in [11102230246251565404236316680908203125e-53, 9007199254740992],
	b in [11102230246251565404236316680908203125e-53, 9007199254740992],
	c in [11102230246251565404236316680908203125e-53, 9007199254740992]
code: THEORY
BEGIN
f(a, b, c: real): real =
	((- b) + (sqrt(((b * b) - (((3) * a) * c))))) / ((3) * a)
END code
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}

Alternative 1: 95.6% accurate, 0.2× speedup?

\[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
\[\frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-1.0546875 \cdot {\left(c \cdot a\right)}^{4}, \frac{{b}^{-6}}{a}, \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot c\right) \cdot \left(c \cdot \left({b}^{-4} \cdot -0.5625\right)\right)\right)\right)\right)}{b} \]
(FPCore (a b c)
  :precision binary64
  :pre (and (and (and (< 1.1102230246251565e-16 a)
               (< a 9007199254740992.0))
          (and (< 1.1102230246251565e-16 b)
               (< b 9007199254740992.0)))
     (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
  (/
 (fma
  (/ c (* b b))
  (* (* -0.375 a) c)
  (fma
   -0.5
   c
   (fma
    (* -1.0546875 (pow (* c a) 4.0))
    (/ (pow b -6.0) a)
    (* (* (* (* a a) c) c) (* c (* (pow b -4.0) -0.5625))))))
 b))
double code(double a, double b, double c) {
	return fma((c / (b * b)), ((-0.375 * a) * c), fma(-0.5, c, fma((-1.0546875 * pow((c * a), 4.0)), (pow(b, -6.0) / a), ((((a * a) * c) * c) * (c * (pow(b, -4.0) * -0.5625)))))) / b;
}
function code(a, b, c)
	return Float64(fma(Float64(c / Float64(b * b)), Float64(Float64(-0.375 * a) * c), fma(-0.5, c, fma(Float64(-1.0546875 * (Float64(c * a) ^ 4.0)), Float64((b ^ -6.0) / a), Float64(Float64(Float64(Float64(a * a) * c) * c) * Float64(c * Float64((b ^ -4.0) * -0.5625)))))) / b)
end
code[a_, b_, c_] := N[(N[(N[(c / N[(b * b), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.375 * a), $MachinePrecision] * c), $MachinePrecision] + N[(-0.5 * c + N[(N[(-1.0546875 * N[Power[N[(c * a), $MachinePrecision], 4.0], $MachinePrecision]), $MachinePrecision] * N[(N[Power[b, -6.0], $MachinePrecision] / a), $MachinePrecision] + N[(N[(N[(N[(a * a), $MachinePrecision] * c), $MachinePrecision] * c), $MachinePrecision] * N[(c * N[(N[Power[b, -4.0], $MachinePrecision] * -0.5625), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]
f(a, b, c):
	a in [11102230246251565404236316680908203125e-53, 9007199254740992],
	b in [11102230246251565404236316680908203125e-53, 9007199254740992],
	c in [11102230246251565404236316680908203125e-53, 9007199254740992]
code: THEORY
BEGIN
f(a, b, c: real): real =
	(((c / (b * b)) * (((-375e-3) * a) * c)) + (((-5e-1) * c) + ((((-10546875e-7) * ((c * a) ^ (4))) * ((b ^ (-6)) / a)) + ((((a * a) * c) * c) * (c * ((b ^ (-4)) * (-5625e-4))))))) / b
END code
\frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-1.0546875 \cdot {\left(c \cdot a\right)}^{4}, \frac{{b}^{-6}}{a}, \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot c\right) \cdot \left(c \cdot \left({b}^{-4} \cdot -0.5625\right)\right)\right)\right)\right)}{b}
Derivation
  1. Initial program 31.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Taylor expanded in b around inf

    \[\leadsto \frac{\frac{-9}{16} \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}} + \left(\frac{-1}{2} \cdot c + \left(\frac{-3}{8} \cdot \frac{a \cdot {c}^{2}}{{b}^{2}} + \frac{-1}{6} \cdot \frac{\frac{81}{64} \cdot \left({a}^{4} \cdot {c}^{4}\right) + \frac{81}{16} \cdot \left({a}^{4} \cdot {c}^{4}\right)}{a \cdot {b}^{6}}\right)\right)}{b} \]
  3. Step-by-step derivation
    1. Applied rewrites95.6%

      \[\leadsto \frac{\mathsf{fma}\left(-0.5625, \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-0.375, \frac{a \cdot {c}^{2}}{{b}^{2}}, -0.16666666666666666 \cdot \frac{\mathsf{fma}\left(1.265625, {a}^{4} \cdot {c}^{4}, 5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right)\right)}{a \cdot {b}^{6}}\right)\right)\right)}{b} \]
    2. Applied rewrites95.6%

      \[\leadsto \frac{\mathsf{fma}\left(-0.375 \cdot a, c \cdot \frac{c}{b \cdot b}, -0.5 \cdot c\right) + \mathsf{fma}\left(\left(6.328125 \cdot {\left(c \cdot a\right)}^{4}\right) \cdot -0.16666666666666666, \frac{{b}^{-6}}{a}, \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot \left(c \cdot c\right)\right) \cdot \left({b}^{-4} \cdot -0.5625\right)\right)}{b} \]
    3. Step-by-step derivation
      1. Applied rewrites95.6%

        \[\leadsto \frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-1.0546875 \cdot {\left(c \cdot a\right)}^{4}, \frac{{b}^{-6}}{a}, \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot c\right) \cdot \left(c \cdot \left({b}^{-4} \cdot -0.5625\right)\right)\right)\right)\right)}{b} \]
      2. Add Preprocessing

      Alternative 2: 95.5% accurate, 0.2× speedup?

      \[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
      \[\frac{\mathsf{fma}\left(c, \mathsf{fma}\left(-0.375 \cdot a, \frac{c}{b \cdot b}, -0.5\right), \mathsf{fma}\left({b}^{-4} \cdot c, -0.5625 \cdot \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot c\right), \left(\frac{{b}^{-6}}{a} \cdot -1.0546875\right) \cdot {\left(c \cdot a\right)}^{4}\right)\right)}{b} \]
      (FPCore (a b c)
        :precision binary64
        :pre (and (and (and (< 1.1102230246251565e-16 a)
                     (< a 9007199254740992.0))
                (and (< 1.1102230246251565e-16 b)
                     (< b 9007199254740992.0)))
           (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
        (/
       (fma
        c
        (fma (* -0.375 a) (/ c (* b b)) -0.5)
        (fma
         (* (pow b -4.0) c)
         (* -0.5625 (* (* (* a a) c) c))
         (* (* (/ (pow b -6.0) a) -1.0546875) (pow (* c a) 4.0))))
       b))
      double code(double a, double b, double c) {
      	return fma(c, fma((-0.375 * a), (c / (b * b)), -0.5), fma((pow(b, -4.0) * c), (-0.5625 * (((a * a) * c) * c)), (((pow(b, -6.0) / a) * -1.0546875) * pow((c * a), 4.0)))) / b;
      }
      
      function code(a, b, c)
      	return Float64(fma(c, fma(Float64(-0.375 * a), Float64(c / Float64(b * b)), -0.5), fma(Float64((b ^ -4.0) * c), Float64(-0.5625 * Float64(Float64(Float64(a * a) * c) * c)), Float64(Float64(Float64((b ^ -6.0) / a) * -1.0546875) * (Float64(c * a) ^ 4.0)))) / b)
      end
      
      code[a_, b_, c_] := N[(N[(c * N[(N[(-0.375 * a), $MachinePrecision] * N[(c / N[(b * b), $MachinePrecision]), $MachinePrecision] + -0.5), $MachinePrecision] + N[(N[(N[Power[b, -4.0], $MachinePrecision] * c), $MachinePrecision] * N[(-0.5625 * N[(N[(N[(a * a), $MachinePrecision] * c), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[Power[b, -6.0], $MachinePrecision] / a), $MachinePrecision] * -1.0546875), $MachinePrecision] * N[Power[N[(c * a), $MachinePrecision], 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]
      
      f(a, b, c):
      	a in [11102230246251565404236316680908203125e-53, 9007199254740992],
      	b in [11102230246251565404236316680908203125e-53, 9007199254740992],
      	c in [11102230246251565404236316680908203125e-53, 9007199254740992]
      code: THEORY
      BEGIN
      f(a, b, c: real): real =
      	((c * ((((-375e-3) * a) * (c / (b * b))) + (-5e-1))) + ((((b ^ (-4)) * c) * ((-5625e-4) * (((a * a) * c) * c))) + ((((b ^ (-6)) / a) * (-10546875e-7)) * ((c * a) ^ (4))))) / b
      END code
      \frac{\mathsf{fma}\left(c, \mathsf{fma}\left(-0.375 \cdot a, \frac{c}{b \cdot b}, -0.5\right), \mathsf{fma}\left({b}^{-4} \cdot c, -0.5625 \cdot \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot c\right), \left(\frac{{b}^{-6}}{a} \cdot -1.0546875\right) \cdot {\left(c \cdot a\right)}^{4}\right)\right)}{b}
      
      Derivation
      1. Initial program 31.0%

        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
      2. Taylor expanded in b around inf

        \[\leadsto \frac{\frac{-9}{16} \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}} + \left(\frac{-1}{2} \cdot c + \left(\frac{-3}{8} \cdot \frac{a \cdot {c}^{2}}{{b}^{2}} + \frac{-1}{6} \cdot \frac{\frac{81}{64} \cdot \left({a}^{4} \cdot {c}^{4}\right) + \frac{81}{16} \cdot \left({a}^{4} \cdot {c}^{4}\right)}{a \cdot {b}^{6}}\right)\right)}{b} \]
      3. Step-by-step derivation
        1. Applied rewrites95.6%

          \[\leadsto \frac{\mathsf{fma}\left(-0.5625, \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-0.375, \frac{a \cdot {c}^{2}}{{b}^{2}}, -0.16666666666666666 \cdot \frac{\mathsf{fma}\left(1.265625, {a}^{4} \cdot {c}^{4}, 5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right)\right)}{a \cdot {b}^{6}}\right)\right)\right)}{b} \]
        2. Applied rewrites95.6%

          \[\leadsto \frac{\mathsf{fma}\left(-0.375 \cdot a, c \cdot \frac{c}{b \cdot b}, -0.5 \cdot c\right) + \mathsf{fma}\left(\left(6.328125 \cdot {\left(c \cdot a\right)}^{4}\right) \cdot -0.16666666666666666, \frac{{b}^{-6}}{a}, \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot \left(c \cdot c\right)\right) \cdot \left({b}^{-4} \cdot -0.5625\right)\right)}{b} \]
        3. Step-by-step derivation
          1. Applied rewrites95.6%

            \[\leadsto \frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-1.0546875 \cdot {\left(c \cdot a\right)}^{4}, \frac{{b}^{-6}}{a}, \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot c\right) \cdot \left(c \cdot \left({b}^{-4} \cdot -0.5625\right)\right)\right)\right)\right)}{b} \]
          2. Applied rewrites95.5%

            \[\leadsto \frac{\mathsf{fma}\left(c, \mathsf{fma}\left(-0.375 \cdot a, \frac{c}{b \cdot b}, -0.5\right), \mathsf{fma}\left({b}^{-4} \cdot c, -0.5625 \cdot \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot c\right), \left(\frac{{b}^{-6}}{a} \cdot -1.0546875\right) \cdot {\left(c \cdot a\right)}^{4}\right)\right)}{b} \]
          3. Add Preprocessing

          Alternative 3: 95.5% accurate, 0.2× speedup?

          \[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
          \[\frac{\mathsf{fma}\left({\left(c \cdot a\right)}^{4}, -1.0546875 \cdot \frac{{b}^{-6}}{a}, \mathsf{fma}\left(\left(\left({b}^{-4} \cdot -0.5625\right) \cdot c\right) \cdot \left(a \cdot a\right), c \cdot c, c \cdot \mathsf{fma}\left(-0.375 \cdot a, \frac{c}{b \cdot b}, -0.5\right)\right)\right)}{b} \]
          (FPCore (a b c)
            :precision binary64
            :pre (and (and (and (< 1.1102230246251565e-16 a)
                         (< a 9007199254740992.0))
                    (and (< 1.1102230246251565e-16 b)
                         (< b 9007199254740992.0)))
               (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
            (/
           (fma
            (pow (* c a) 4.0)
            (* -1.0546875 (/ (pow b -6.0) a))
            (fma
             (* (* (* (pow b -4.0) -0.5625) c) (* a a))
             (* c c)
             (* c (fma (* -0.375 a) (/ c (* b b)) -0.5))))
           b))
          double code(double a, double b, double c) {
          	return fma(pow((c * a), 4.0), (-1.0546875 * (pow(b, -6.0) / a)), fma((((pow(b, -4.0) * -0.5625) * c) * (a * a)), (c * c), (c * fma((-0.375 * a), (c / (b * b)), -0.5)))) / b;
          }
          
          function code(a, b, c)
          	return Float64(fma((Float64(c * a) ^ 4.0), Float64(-1.0546875 * Float64((b ^ -6.0) / a)), fma(Float64(Float64(Float64((b ^ -4.0) * -0.5625) * c) * Float64(a * a)), Float64(c * c), Float64(c * fma(Float64(-0.375 * a), Float64(c / Float64(b * b)), -0.5)))) / b)
          end
          
          code[a_, b_, c_] := N[(N[(N[Power[N[(c * a), $MachinePrecision], 4.0], $MachinePrecision] * N[(-1.0546875 * N[(N[Power[b, -6.0], $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision] + N[(N[(N[(N[(N[Power[b, -4.0], $MachinePrecision] * -0.5625), $MachinePrecision] * c), $MachinePrecision] * N[(a * a), $MachinePrecision]), $MachinePrecision] * N[(c * c), $MachinePrecision] + N[(c * N[(N[(-0.375 * a), $MachinePrecision] * N[(c / N[(b * b), $MachinePrecision]), $MachinePrecision] + -0.5), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]
          
          f(a, b, c):
          	a in [11102230246251565404236316680908203125e-53, 9007199254740992],
          	b in [11102230246251565404236316680908203125e-53, 9007199254740992],
          	c in [11102230246251565404236316680908203125e-53, 9007199254740992]
          code: THEORY
          BEGIN
          f(a, b, c: real): real =
          	((((c * a) ^ (4)) * ((-10546875e-7) * ((b ^ (-6)) / a))) + ((((((b ^ (-4)) * (-5625e-4)) * c) * (a * a)) * (c * c)) + (c * ((((-375e-3) * a) * (c / (b * b))) + (-5e-1))))) / b
          END code
          \frac{\mathsf{fma}\left({\left(c \cdot a\right)}^{4}, -1.0546875 \cdot \frac{{b}^{-6}}{a}, \mathsf{fma}\left(\left(\left({b}^{-4} \cdot -0.5625\right) \cdot c\right) \cdot \left(a \cdot a\right), c \cdot c, c \cdot \mathsf{fma}\left(-0.375 \cdot a, \frac{c}{b \cdot b}, -0.5\right)\right)\right)}{b}
          
          Derivation
          1. Initial program 31.0%

            \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
          2. Taylor expanded in b around inf

            \[\leadsto \frac{\frac{-9}{16} \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}} + \left(\frac{-1}{2} \cdot c + \left(\frac{-3}{8} \cdot \frac{a \cdot {c}^{2}}{{b}^{2}} + \frac{-1}{6} \cdot \frac{\frac{81}{64} \cdot \left({a}^{4} \cdot {c}^{4}\right) + \frac{81}{16} \cdot \left({a}^{4} \cdot {c}^{4}\right)}{a \cdot {b}^{6}}\right)\right)}{b} \]
          3. Step-by-step derivation
            1. Applied rewrites95.6%

              \[\leadsto \frac{\mathsf{fma}\left(-0.5625, \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-0.375, \frac{a \cdot {c}^{2}}{{b}^{2}}, -0.16666666666666666 \cdot \frac{\mathsf{fma}\left(1.265625, {a}^{4} \cdot {c}^{4}, 5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right)\right)}{a \cdot {b}^{6}}\right)\right)\right)}{b} \]
            2. Applied rewrites95.6%

              \[\leadsto \frac{\mathsf{fma}\left(-0.375 \cdot a, c \cdot \frac{c}{b \cdot b}, -0.5 \cdot c\right) + \mathsf{fma}\left(\left(6.328125 \cdot {\left(c \cdot a\right)}^{4}\right) \cdot -0.16666666666666666, \frac{{b}^{-6}}{a}, \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot \left(c \cdot c\right)\right) \cdot \left({b}^{-4} \cdot -0.5625\right)\right)}{b} \]
            3. Step-by-step derivation
              1. Applied rewrites95.6%

                \[\leadsto \frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-1.0546875 \cdot {\left(c \cdot a\right)}^{4}, \frac{{b}^{-6}}{a}, \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot c\right) \cdot \left(c \cdot \left({b}^{-4} \cdot -0.5625\right)\right)\right)\right)\right)}{b} \]
              2. Applied rewrites95.5%

                \[\leadsto \frac{\mathsf{fma}\left({\left(c \cdot a\right)}^{4}, -1.0546875 \cdot \frac{{b}^{-6}}{a}, \mathsf{fma}\left(\left(\left({b}^{-4} \cdot -0.5625\right) \cdot c\right) \cdot \left(a \cdot a\right), c \cdot c, c \cdot \mathsf{fma}\left(-0.375 \cdot a, \frac{c}{b \cdot b}, -0.5\right)\right)\right)}{b} \]
              3. Add Preprocessing

              Alternative 4: 94.0% accurate, 0.3× speedup?

              \[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
              \[\frac{\mathsf{fma}\left(-0.5, c, a \cdot \mathsf{fma}\left(-0.5625, \frac{a \cdot {c}^{3}}{{b}^{4}}, -0.375 \cdot \frac{{c}^{2}}{{b}^{2}}\right)\right)}{b} \]
              (FPCore (a b c)
                :precision binary64
                :pre (and (and (and (< 1.1102230246251565e-16 a)
                             (< a 9007199254740992.0))
                        (and (< 1.1102230246251565e-16 b)
                             (< b 9007199254740992.0)))
                   (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
                (/
               (fma
                -0.5
                c
                (*
                 a
                 (fma
                  -0.5625
                  (/ (* a (pow c 3.0)) (pow b 4.0))
                  (* -0.375 (/ (pow c 2.0) (pow b 2.0))))))
               b))
              double code(double a, double b, double c) {
              	return fma(-0.5, c, (a * fma(-0.5625, ((a * pow(c, 3.0)) / pow(b, 4.0)), (-0.375 * (pow(c, 2.0) / pow(b, 2.0)))))) / b;
              }
              
              function code(a, b, c)
              	return Float64(fma(-0.5, c, Float64(a * fma(-0.5625, Float64(Float64(a * (c ^ 3.0)) / (b ^ 4.0)), Float64(-0.375 * Float64((c ^ 2.0) / (b ^ 2.0)))))) / b)
              end
              
              code[a_, b_, c_] := N[(N[(-0.5 * c + N[(a * N[(-0.5625 * N[(N[(a * N[Power[c, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-0.375 * N[(N[Power[c, 2.0], $MachinePrecision] / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]
              
              f(a, b, c):
              	a in [11102230246251565404236316680908203125e-53, 9007199254740992],
              	b in [11102230246251565404236316680908203125e-53, 9007199254740992],
              	c in [11102230246251565404236316680908203125e-53, 9007199254740992]
              code: THEORY
              BEGIN
              f(a, b, c: real): real =
              	(((-5e-1) * c) + (a * (((-5625e-4) * ((a * (c ^ (3))) / (b ^ (4)))) + ((-375e-3) * ((c ^ (2)) / (b ^ (2))))))) / b
              END code
              \frac{\mathsf{fma}\left(-0.5, c, a \cdot \mathsf{fma}\left(-0.5625, \frac{a \cdot {c}^{3}}{{b}^{4}}, -0.375 \cdot \frac{{c}^{2}}{{b}^{2}}\right)\right)}{b}
              
              Derivation
              1. Initial program 31.0%

                \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
              2. Taylor expanded in b around inf

                \[\leadsto \frac{\frac{-9}{16} \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}} + \left(\frac{-1}{2} \cdot c + \left(\frac{-3}{8} \cdot \frac{a \cdot {c}^{2}}{{b}^{2}} + \frac{-1}{6} \cdot \frac{\frac{81}{64} \cdot \left({a}^{4} \cdot {c}^{4}\right) + \frac{81}{16} \cdot \left({a}^{4} \cdot {c}^{4}\right)}{a \cdot {b}^{6}}\right)\right)}{b} \]
              3. Step-by-step derivation
                1. Applied rewrites95.6%

                  \[\leadsto \frac{\mathsf{fma}\left(-0.5625, \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-0.375, \frac{a \cdot {c}^{2}}{{b}^{2}}, -0.16666666666666666 \cdot \frac{\mathsf{fma}\left(1.265625, {a}^{4} \cdot {c}^{4}, 5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right)\right)}{a \cdot {b}^{6}}\right)\right)\right)}{b} \]
                2. Taylor expanded in a around 0

                  \[\leadsto \frac{\frac{-1}{2} \cdot c + a \cdot \left(\frac{-9}{16} \cdot \frac{a \cdot {c}^{3}}{{b}^{4}} + \frac{-3}{8} \cdot \frac{{c}^{2}}{{b}^{2}}\right)}{b} \]
                3. Step-by-step derivation
                  1. Applied rewrites94.0%

                    \[\leadsto \frac{\mathsf{fma}\left(-0.5, c, a \cdot \mathsf{fma}\left(-0.5625, \frac{a \cdot {c}^{3}}{{b}^{4}}, -0.375 \cdot \frac{{c}^{2}}{{b}^{2}}\right)\right)}{b} \]
                  2. Add Preprocessing

                  Alternative 5: 94.0% accurate, 0.3× speedup?

                  \[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
                  \[\frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, \mathsf{fma}\left(-0.5625, \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}}, -0.5 \cdot c\right)\right)}{b} \]
                  (FPCore (a b c)
                    :precision binary64
                    :pre (and (and (and (< 1.1102230246251565e-16 a)
                                 (< a 9007199254740992.0))
                            (and (< 1.1102230246251565e-16 b)
                                 (< b 9007199254740992.0)))
                       (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
                    (/
                   (fma
                    (/ c (* b b))
                    (* (* -0.375 a) c)
                    (fma
                     -0.5625
                     (/ (* (pow a 2.0) (pow c 3.0)) (pow b 4.0))
                     (* -0.5 c)))
                   b))
                  double code(double a, double b, double c) {
                  	return fma((c / (b * b)), ((-0.375 * a) * c), fma(-0.5625, ((pow(a, 2.0) * pow(c, 3.0)) / pow(b, 4.0)), (-0.5 * c))) / b;
                  }
                  
                  function code(a, b, c)
                  	return Float64(fma(Float64(c / Float64(b * b)), Float64(Float64(-0.375 * a) * c), fma(-0.5625, Float64(Float64((a ^ 2.0) * (c ^ 3.0)) / (b ^ 4.0)), Float64(-0.5 * c))) / b)
                  end
                  
                  code[a_, b_, c_] := N[(N[(N[(c / N[(b * b), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.375 * a), $MachinePrecision] * c), $MachinePrecision] + N[(-0.5625 * N[(N[(N[Power[a, 2.0], $MachinePrecision] * N[Power[c, 3.0], $MachinePrecision]), $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-0.5 * c), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]
                  
                  f(a, b, c):
                  	a in [11102230246251565404236316680908203125e-53, 9007199254740992],
                  	b in [11102230246251565404236316680908203125e-53, 9007199254740992],
                  	c in [11102230246251565404236316680908203125e-53, 9007199254740992]
                  code: THEORY
                  BEGIN
                  f(a, b, c: real): real =
                  	(((c / (b * b)) * (((-375e-3) * a) * c)) + (((-5625e-4) * (((a ^ (2)) * (c ^ (3))) / (b ^ (4)))) + ((-5e-1) * c))) / b
                  END code
                  \frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, \mathsf{fma}\left(-0.5625, \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}}, -0.5 \cdot c\right)\right)}{b}
                  
                  Derivation
                  1. Initial program 31.0%

                    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                  2. Taylor expanded in b around inf

                    \[\leadsto \frac{\frac{-9}{16} \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}} + \left(\frac{-1}{2} \cdot c + \left(\frac{-3}{8} \cdot \frac{a \cdot {c}^{2}}{{b}^{2}} + \frac{-1}{6} \cdot \frac{\frac{81}{64} \cdot \left({a}^{4} \cdot {c}^{4}\right) + \frac{81}{16} \cdot \left({a}^{4} \cdot {c}^{4}\right)}{a \cdot {b}^{6}}\right)\right)}{b} \]
                  3. Step-by-step derivation
                    1. Applied rewrites95.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-0.5625, \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-0.375, \frac{a \cdot {c}^{2}}{{b}^{2}}, -0.16666666666666666 \cdot \frac{\mathsf{fma}\left(1.265625, {a}^{4} \cdot {c}^{4}, 5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right)\right)}{a \cdot {b}^{6}}\right)\right)\right)}{b} \]
                    2. Applied rewrites95.6%

                      \[\leadsto \frac{\mathsf{fma}\left(-0.375 \cdot a, c \cdot \frac{c}{b \cdot b}, -0.5 \cdot c\right) + \mathsf{fma}\left(\left(6.328125 \cdot {\left(c \cdot a\right)}^{4}\right) \cdot -0.16666666666666666, \frac{{b}^{-6}}{a}, \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot \left(c \cdot c\right)\right) \cdot \left({b}^{-4} \cdot -0.5625\right)\right)}{b} \]
                    3. Step-by-step derivation
                      1. Applied rewrites95.6%

                        \[\leadsto \frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-1.0546875 \cdot {\left(c \cdot a\right)}^{4}, \frac{{b}^{-6}}{a}, \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot c\right) \cdot \left(c \cdot \left({b}^{-4} \cdot -0.5625\right)\right)\right)\right)\right)}{b} \]
                      2. Taylor expanded in a around 0

                        \[\leadsto \frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, \frac{-9}{16} \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}} + \frac{-1}{2} \cdot c\right)}{b} \]
                      3. Step-by-step derivation
                        1. Applied rewrites94.0%

                          \[\leadsto \frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, \mathsf{fma}\left(-0.5625, \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}}, -0.5 \cdot c\right)\right)}{b} \]
                        2. Add Preprocessing

                        Alternative 6: 94.0% accurate, 0.3× speedup?

                        \[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
                        \[\frac{c \cdot \left(c \cdot \mathsf{fma}\left(-0.5625, \frac{{a}^{2} \cdot c}{{b}^{4}}, -0.375 \cdot \frac{a}{{b}^{2}}\right) - 0.5\right)}{b} \]
                        (FPCore (a b c)
                          :precision binary64
                          :pre (and (and (and (< 1.1102230246251565e-16 a)
                                       (< a 9007199254740992.0))
                                  (and (< 1.1102230246251565e-16 b)
                                       (< b 9007199254740992.0)))
                             (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
                          (/
                         (*
                          c
                          (-
                           (*
                            c
                            (fma
                             -0.5625
                             (/ (* (pow a 2.0) c) (pow b 4.0))
                             (* -0.375 (/ a (pow b 2.0)))))
                           0.5))
                         b))
                        double code(double a, double b, double c) {
                        	return (c * ((c * fma(-0.5625, ((pow(a, 2.0) * c) / pow(b, 4.0)), (-0.375 * (a / pow(b, 2.0))))) - 0.5)) / b;
                        }
                        
                        function code(a, b, c)
                        	return Float64(Float64(c * Float64(Float64(c * fma(-0.5625, Float64(Float64((a ^ 2.0) * c) / (b ^ 4.0)), Float64(-0.375 * Float64(a / (b ^ 2.0))))) - 0.5)) / b)
                        end
                        
                        code[a_, b_, c_] := N[(N[(c * N[(N[(c * N[(-0.5625 * N[(N[(N[Power[a, 2.0], $MachinePrecision] * c), $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-0.375 * N[(a / N[Power[b, 2.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]
                        
                        f(a, b, c):
                        	a in [11102230246251565404236316680908203125e-53, 9007199254740992],
                        	b in [11102230246251565404236316680908203125e-53, 9007199254740992],
                        	c in [11102230246251565404236316680908203125e-53, 9007199254740992]
                        code: THEORY
                        BEGIN
                        f(a, b, c: real): real =
                        	(c * ((c * (((-5625e-4) * (((a ^ (2)) * c) / (b ^ (4)))) + ((-375e-3) * (a / (b ^ (2)))))) - (5e-1))) / b
                        END code
                        \frac{c \cdot \left(c \cdot \mathsf{fma}\left(-0.5625, \frac{{a}^{2} \cdot c}{{b}^{4}}, -0.375 \cdot \frac{a}{{b}^{2}}\right) - 0.5\right)}{b}
                        
                        Derivation
                        1. Initial program 31.0%

                          \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                        2. Taylor expanded in b around inf

                          \[\leadsto \frac{\frac{-9}{16} \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}} + \left(\frac{-1}{2} \cdot c + \left(\frac{-3}{8} \cdot \frac{a \cdot {c}^{2}}{{b}^{2}} + \frac{-1}{6} \cdot \frac{\frac{81}{64} \cdot \left({a}^{4} \cdot {c}^{4}\right) + \frac{81}{16} \cdot \left({a}^{4} \cdot {c}^{4}\right)}{a \cdot {b}^{6}}\right)\right)}{b} \]
                        3. Step-by-step derivation
                          1. Applied rewrites95.6%

                            \[\leadsto \frac{\mathsf{fma}\left(-0.5625, \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-0.375, \frac{a \cdot {c}^{2}}{{b}^{2}}, -0.16666666666666666 \cdot \frac{\mathsf{fma}\left(1.265625, {a}^{4} \cdot {c}^{4}, 5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right)\right)}{a \cdot {b}^{6}}\right)\right)\right)}{b} \]
                          2. Taylor expanded in c around 0

                            \[\leadsto \frac{c \cdot \left(c \cdot \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot c}{{b}^{4}} + \frac{-3}{8} \cdot \frac{a}{{b}^{2}}\right) - \frac{1}{2}\right)}{b} \]
                          3. Step-by-step derivation
                            1. Applied rewrites94.0%

                              \[\leadsto \frac{c \cdot \left(c \cdot \mathsf{fma}\left(-0.5625, \frac{{a}^{2} \cdot c}{{b}^{4}}, -0.375 \cdot \frac{a}{{b}^{2}}\right) - 0.5\right)}{b} \]
                            2. Add Preprocessing

                            Alternative 7: 90.9% accurate, 1.0× speedup?

                            \[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
                            \[\frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, -0.5 \cdot c\right)}{b} \]
                            (FPCore (a b c)
                              :precision binary64
                              :pre (and (and (and (< 1.1102230246251565e-16 a)
                                           (< a 9007199254740992.0))
                                      (and (< 1.1102230246251565e-16 b)
                                           (< b 9007199254740992.0)))
                                 (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
                              (/ (fma (/ c (* b b)) (* (* -0.375 a) c) (* -0.5 c)) b))
                            double code(double a, double b, double c) {
                            	return fma((c / (b * b)), ((-0.375 * a) * c), (-0.5 * c)) / b;
                            }
                            
                            function code(a, b, c)
                            	return Float64(fma(Float64(c / Float64(b * b)), Float64(Float64(-0.375 * a) * c), Float64(-0.5 * c)) / b)
                            end
                            
                            code[a_, b_, c_] := N[(N[(N[(c / N[(b * b), $MachinePrecision]), $MachinePrecision] * N[(N[(-0.375 * a), $MachinePrecision] * c), $MachinePrecision] + N[(-0.5 * c), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]
                            
                            f(a, b, c):
                            	a in [11102230246251565404236316680908203125e-53, 9007199254740992],
                            	b in [11102230246251565404236316680908203125e-53, 9007199254740992],
                            	c in [11102230246251565404236316680908203125e-53, 9007199254740992]
                            code: THEORY
                            BEGIN
                            f(a, b, c: real): real =
                            	(((c / (b * b)) * (((-375e-3) * a) * c)) + ((-5e-1) * c)) / b
                            END code
                            \frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, -0.5 \cdot c\right)}{b}
                            
                            Derivation
                            1. Initial program 31.0%

                              \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                            2. Taylor expanded in b around inf

                              \[\leadsto \frac{\frac{-9}{16} \cdot \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}} + \left(\frac{-1}{2} \cdot c + \left(\frac{-3}{8} \cdot \frac{a \cdot {c}^{2}}{{b}^{2}} + \frac{-1}{6} \cdot \frac{\frac{81}{64} \cdot \left({a}^{4} \cdot {c}^{4}\right) + \frac{81}{16} \cdot \left({a}^{4} \cdot {c}^{4}\right)}{a \cdot {b}^{6}}\right)\right)}{b} \]
                            3. Step-by-step derivation
                              1. Applied rewrites95.6%

                                \[\leadsto \frac{\mathsf{fma}\left(-0.5625, \frac{{a}^{2} \cdot {c}^{3}}{{b}^{4}}, \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-0.375, \frac{a \cdot {c}^{2}}{{b}^{2}}, -0.16666666666666666 \cdot \frac{\mathsf{fma}\left(1.265625, {a}^{4} \cdot {c}^{4}, 5.0625 \cdot \left({a}^{4} \cdot {c}^{4}\right)\right)}{a \cdot {b}^{6}}\right)\right)\right)}{b} \]
                              2. Applied rewrites95.6%

                                \[\leadsto \frac{\mathsf{fma}\left(-0.375 \cdot a, c \cdot \frac{c}{b \cdot b}, -0.5 \cdot c\right) + \mathsf{fma}\left(\left(6.328125 \cdot {\left(c \cdot a\right)}^{4}\right) \cdot -0.16666666666666666, \frac{{b}^{-6}}{a}, \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot \left(c \cdot c\right)\right) \cdot \left({b}^{-4} \cdot -0.5625\right)\right)}{b} \]
                              3. Step-by-step derivation
                                1. Applied rewrites95.6%

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-1.0546875 \cdot {\left(c \cdot a\right)}^{4}, \frac{{b}^{-6}}{a}, \left(\left(\left(a \cdot a\right) \cdot c\right) \cdot c\right) \cdot \left(c \cdot \left({b}^{-4} \cdot -0.5625\right)\right)\right)\right)\right)}{b} \]
                                2. Taylor expanded in a around 0

                                  \[\leadsto \frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, \frac{-1}{2} \cdot c\right)}{b} \]
                                3. Step-by-step derivation
                                  1. Applied rewrites90.9%

                                    \[\leadsto \frac{\mathsf{fma}\left(\frac{c}{b \cdot b}, \left(-0.375 \cdot a\right) \cdot c, -0.5 \cdot c\right)}{b} \]
                                  2. Add Preprocessing

                                  Alternative 8: 84.3% accurate, 0.5× speedup?

                                  \[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
                                  \[\begin{array}{l} \mathbf{if}\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \leq -3 \cdot 10^{-9}:\\ \;\;\;\;\frac{\left(-b\right) + \sqrt{\mathsf{fma}\left(b, b, \left(-3 \cdot a\right) \cdot c\right)}}{3 \cdot a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
                                  (FPCore (a b c)
                                    :precision binary64
                                    :pre (and (and (and (< 1.1102230246251565e-16 a)
                                                 (< a 9007199254740992.0))
                                            (and (< 1.1102230246251565e-16 b)
                                                 (< b 9007199254740992.0)))
                                       (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
                                    (if (<=
                                       (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a))
                                       -3e-9)
                                    (/ (+ (- b) (sqrt (fma b b (* (* -3.0 a) c)))) (* 3.0 a))
                                    (* -0.5 (/ c b))))
                                  double code(double a, double b, double c) {
                                  	double tmp;
                                  	if (((-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)) <= -3e-9) {
                                  		tmp = (-b + sqrt(fma(b, b, ((-3.0 * a) * c)))) / (3.0 * a);
                                  	} else {
                                  		tmp = -0.5 * (c / b);
                                  	}
                                  	return tmp;
                                  }
                                  
                                  function code(a, b, c)
                                  	tmp = 0.0
                                  	if (Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a)) <= -3e-9)
                                  		tmp = Float64(Float64(Float64(-b) + sqrt(fma(b, b, Float64(Float64(-3.0 * a) * c)))) / Float64(3.0 * a));
                                  	else
                                  		tmp = Float64(-0.5 * Float64(c / b));
                                  	end
                                  	return tmp
                                  end
                                  
                                  code[a_, b_, c_] := If[LessEqual[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], -3e-9], N[(N[((-b) + N[Sqrt[N[(b * b + N[(N[(-3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
                                  
                                  f(a, b, c):
                                  	a in [11102230246251565404236316680908203125e-53, 9007199254740992],
                                  	b in [11102230246251565404236316680908203125e-53, 9007199254740992],
                                  	c in [11102230246251565404236316680908203125e-53, 9007199254740992]
                                  code: THEORY
                                  BEGIN
                                  f(a, b, c: real): real =
                                  	LET tmp = IF ((((- b) + (sqrt(((b * b) - (((3) * a) * c))))) / ((3) * a)) <= (-2999999999999999980049621235082650538839033060867222957313060760498046875e-81)) THEN (((- b) + (sqrt(((b * b) + (((-3) * a) * c))))) / ((3) * a)) ELSE ((-5e-1) * (c / b)) ENDIF IN
                                  	tmp
                                  END code
                                  \begin{array}{l}
                                  \mathbf{if}\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \leq -3 \cdot 10^{-9}:\\
                                  \;\;\;\;\frac{\left(-b\right) + \sqrt{\mathsf{fma}\left(b, b, \left(-3 \cdot a\right) \cdot c\right)}}{3 \cdot a}\\
                                  
                                  \mathbf{else}:\\
                                  \;\;\;\;-0.5 \cdot \frac{c}{b}\\
                                  
                                  
                                  \end{array}
                                  
                                  Derivation
                                  1. Split input into 2 regimes
                                  2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a)) < -3e-9

                                    1. Initial program 31.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. Applied rewrites31.0%

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

                                      if -3e-9 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a))

                                      1. Initial program 31.0%

                                        \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                                      2. Taylor expanded in b around inf

                                        \[\leadsto \frac{-1}{2} \cdot \frac{c}{b} \]
                                      3. Step-by-step derivation
                                        1. Applied rewrites81.6%

                                          \[\leadsto -0.5 \cdot \frac{c}{b} \]
                                      4. Recombined 2 regimes into one program.
                                      5. Add Preprocessing

                                      Alternative 9: 84.3% accurate, 0.5× speedup?

                                      \[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
                                      \[\begin{array}{l} \mathbf{if}\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \leq -3 \cdot 10^{-9}:\\ \;\;\;\;\frac{0.3333333333333333 \cdot \left(\sqrt{\mathsf{fma}\left(c \cdot -3, a, b \cdot b\right)} - b\right)}{a}\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
                                      (FPCore (a b c)
                                        :precision binary64
                                        :pre (and (and (and (< 1.1102230246251565e-16 a)
                                                     (< a 9007199254740992.0))
                                                (and (< 1.1102230246251565e-16 b)
                                                     (< b 9007199254740992.0)))
                                           (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
                                        (if (<=
                                           (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a))
                                           -3e-9)
                                        (/ (* 0.3333333333333333 (- (sqrt (fma (* c -3.0) a (* b b))) b)) a)
                                        (* -0.5 (/ c b))))
                                      double code(double a, double b, double c) {
                                      	double tmp;
                                      	if (((-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)) <= -3e-9) {
                                      		tmp = (0.3333333333333333 * (sqrt(fma((c * -3.0), a, (b * b))) - b)) / a;
                                      	} else {
                                      		tmp = -0.5 * (c / b);
                                      	}
                                      	return tmp;
                                      }
                                      
                                      function code(a, b, c)
                                      	tmp = 0.0
                                      	if (Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a)) <= -3e-9)
                                      		tmp = Float64(Float64(0.3333333333333333 * Float64(sqrt(fma(Float64(c * -3.0), a, Float64(b * b))) - b)) / a);
                                      	else
                                      		tmp = Float64(-0.5 * Float64(c / b));
                                      	end
                                      	return tmp
                                      end
                                      
                                      code[a_, b_, c_] := If[LessEqual[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], -3e-9], N[(N[(0.3333333333333333 * N[(N[Sqrt[N[(N[(c * -3.0), $MachinePrecision] * a + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision] / a), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
                                      
                                      f(a, b, c):
                                      	a in [11102230246251565404236316680908203125e-53, 9007199254740992],
                                      	b in [11102230246251565404236316680908203125e-53, 9007199254740992],
                                      	c in [11102230246251565404236316680908203125e-53, 9007199254740992]
                                      code: THEORY
                                      BEGIN
                                      f(a, b, c: real): real =
                                      	LET tmp = IF ((((- b) + (sqrt(((b * b) - (((3) * a) * c))))) / ((3) * a)) <= (-2999999999999999980049621235082650538839033060867222957313060760498046875e-81)) THEN (((333333333333333314829616256247390992939472198486328125e-54) * ((sqrt((((c * (-3)) * a) + (b * b)))) - b)) / a) ELSE ((-5e-1) * (c / b)) ENDIF IN
                                      	tmp
                                      END code
                                      \begin{array}{l}
                                      \mathbf{if}\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \leq -3 \cdot 10^{-9}:\\
                                      \;\;\;\;\frac{0.3333333333333333 \cdot \left(\sqrt{\mathsf{fma}\left(c \cdot -3, a, b \cdot b\right)} - b\right)}{a}\\
                                      
                                      \mathbf{else}:\\
                                      \;\;\;\;-0.5 \cdot \frac{c}{b}\\
                                      
                                      
                                      \end{array}
                                      
                                      Derivation
                                      1. Split input into 2 regimes
                                      2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a)) < -3e-9

                                        1. Initial program 31.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. Applied rewrites31.0%

                                            \[\leadsto \frac{0.3333333333333333 \cdot \left(\sqrt{\mathsf{fma}\left(c \cdot -3, a, b \cdot b\right)} - b\right)}{a} \]

                                          if -3e-9 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a))

                                          1. Initial program 31.0%

                                            \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                                          2. Taylor expanded in b around inf

                                            \[\leadsto \frac{-1}{2} \cdot \frac{c}{b} \]
                                          3. Step-by-step derivation
                                            1. Applied rewrites81.6%

                                              \[\leadsto -0.5 \cdot \frac{c}{b} \]
                                          4. Recombined 2 regimes into one program.
                                          5. Add Preprocessing

                                          Alternative 10: 84.3% accurate, 0.5× speedup?

                                          \[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
                                          \[\begin{array}{l} \mathbf{if}\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \leq -3 \cdot 10^{-9}:\\ \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(c \cdot -3, a, b \cdot b\right)} - b}{a} \cdot 0.3333333333333333\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
                                          (FPCore (a b c)
                                            :precision binary64
                                            :pre (and (and (and (< 1.1102230246251565e-16 a)
                                                         (< a 9007199254740992.0))
                                                    (and (< 1.1102230246251565e-16 b)
                                                         (< b 9007199254740992.0)))
                                               (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
                                            (if (<=
                                               (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a))
                                               -3e-9)
                                            (* (/ (- (sqrt (fma (* c -3.0) a (* b b))) b) a) 0.3333333333333333)
                                            (* -0.5 (/ c b))))
                                          double code(double a, double b, double c) {
                                          	double tmp;
                                          	if (((-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)) <= -3e-9) {
                                          		tmp = ((sqrt(fma((c * -3.0), a, (b * b))) - b) / a) * 0.3333333333333333;
                                          	} else {
                                          		tmp = -0.5 * (c / b);
                                          	}
                                          	return tmp;
                                          }
                                          
                                          function code(a, b, c)
                                          	tmp = 0.0
                                          	if (Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a)) <= -3e-9)
                                          		tmp = Float64(Float64(Float64(sqrt(fma(Float64(c * -3.0), a, Float64(b * b))) - b) / a) * 0.3333333333333333);
                                          	else
                                          		tmp = Float64(-0.5 * Float64(c / b));
                                          	end
                                          	return tmp
                                          end
                                          
                                          code[a_, b_, c_] := If[LessEqual[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], -3e-9], N[(N[(N[(N[Sqrt[N[(N[(c * -3.0), $MachinePrecision] * a + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision] / a), $MachinePrecision] * 0.3333333333333333), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
                                          
                                          f(a, b, c):
                                          	a in [11102230246251565404236316680908203125e-53, 9007199254740992],
                                          	b in [11102230246251565404236316680908203125e-53, 9007199254740992],
                                          	c in [11102230246251565404236316680908203125e-53, 9007199254740992]
                                          code: THEORY
                                          BEGIN
                                          f(a, b, c: real): real =
                                          	LET tmp = IF ((((- b) + (sqrt(((b * b) - (((3) * a) * c))))) / ((3) * a)) <= (-2999999999999999980049621235082650538839033060867222957313060760498046875e-81)) THEN ((((sqrt((((c * (-3)) * a) + (b * b)))) - b) / a) * (333333333333333314829616256247390992939472198486328125e-54)) ELSE ((-5e-1) * (c / b)) ENDIF IN
                                          	tmp
                                          END code
                                          \begin{array}{l}
                                          \mathbf{if}\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \leq -3 \cdot 10^{-9}:\\
                                          \;\;\;\;\frac{\sqrt{\mathsf{fma}\left(c \cdot -3, a, b \cdot b\right)} - b}{a} \cdot 0.3333333333333333\\
                                          
                                          \mathbf{else}:\\
                                          \;\;\;\;-0.5 \cdot \frac{c}{b}\\
                                          
                                          
                                          \end{array}
                                          
                                          Derivation
                                          1. Split input into 2 regimes
                                          2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a)) < -3e-9

                                            1. Initial program 31.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. Applied rewrites31.0%

                                                \[\leadsto \frac{\sqrt{\mathsf{fma}\left(c \cdot -3, a, b \cdot b\right)} - b}{a} \cdot 0.3333333333333333 \]

                                              if -3e-9 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a))

                                              1. Initial program 31.0%

                                                \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                                              2. Taylor expanded in b around inf

                                                \[\leadsto \frac{-1}{2} \cdot \frac{c}{b} \]
                                              3. Step-by-step derivation
                                                1. Applied rewrites81.6%

                                                  \[\leadsto -0.5 \cdot \frac{c}{b} \]
                                              4. Recombined 2 regimes into one program.
                                              5. Add Preprocessing

                                              Alternative 11: 84.3% accurate, 0.5× speedup?

                                              \[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
                                              \[\begin{array}{l} \mathbf{if}\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \leq -3 \cdot 10^{-9}:\\ \;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(c \cdot -3, a, b \cdot b\right)} - b\right)\\ \mathbf{else}:\\ \;\;\;\;-0.5 \cdot \frac{c}{b}\\ \end{array} \]
                                              (FPCore (a b c)
                                                :precision binary64
                                                :pre (and (and (and (< 1.1102230246251565e-16 a)
                                                             (< a 9007199254740992.0))
                                                        (and (< 1.1102230246251565e-16 b)
                                                             (< b 9007199254740992.0)))
                                                   (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
                                                (if (<=
                                                   (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a))
                                                   -3e-9)
                                                (* (/ 0.3333333333333333 a) (- (sqrt (fma (* c -3.0) a (* b b))) b))
                                                (* -0.5 (/ c b))))
                                              double code(double a, double b, double c) {
                                              	double tmp;
                                              	if (((-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)) <= -3e-9) {
                                              		tmp = (0.3333333333333333 / a) * (sqrt(fma((c * -3.0), a, (b * b))) - b);
                                              	} else {
                                              		tmp = -0.5 * (c / b);
                                              	}
                                              	return tmp;
                                              }
                                              
                                              function code(a, b, c)
                                              	tmp = 0.0
                                              	if (Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a)) <= -3e-9)
                                              		tmp = Float64(Float64(0.3333333333333333 / a) * Float64(sqrt(fma(Float64(c * -3.0), a, Float64(b * b))) - b));
                                              	else
                                              		tmp = Float64(-0.5 * Float64(c / b));
                                              	end
                                              	return tmp
                                              end
                                              
                                              code[a_, b_, c_] := If[LessEqual[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], -3e-9], N[(N[(0.3333333333333333 / a), $MachinePrecision] * N[(N[Sqrt[N[(N[(c * -3.0), $MachinePrecision] * a + N[(b * b), $MachinePrecision]), $MachinePrecision]], $MachinePrecision] - b), $MachinePrecision]), $MachinePrecision], N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]]
                                              
                                              f(a, b, c):
                                              	a in [11102230246251565404236316680908203125e-53, 9007199254740992],
                                              	b in [11102230246251565404236316680908203125e-53, 9007199254740992],
                                              	c in [11102230246251565404236316680908203125e-53, 9007199254740992]
                                              code: THEORY
                                              BEGIN
                                              f(a, b, c: real): real =
                                              	LET tmp = IF ((((- b) + (sqrt(((b * b) - (((3) * a) * c))))) / ((3) * a)) <= (-2999999999999999980049621235082650538839033060867222957313060760498046875e-81)) THEN (((333333333333333314829616256247390992939472198486328125e-54) / a) * ((sqrt((((c * (-3)) * a) + (b * b)))) - b)) ELSE ((-5e-1) * (c / b)) ENDIF IN
                                              	tmp
                                              END code
                                              \begin{array}{l}
                                              \mathbf{if}\;\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \leq -3 \cdot 10^{-9}:\\
                                              \;\;\;\;\frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(c \cdot -3, a, b \cdot b\right)} - b\right)\\
                                              
                                              \mathbf{else}:\\
                                              \;\;\;\;-0.5 \cdot \frac{c}{b}\\
                                              
                                              
                                              \end{array}
                                              
                                              Derivation
                                              1. Split input into 2 regimes
                                              2. if (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a)) < -3e-9

                                                1. Initial program 31.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. Applied rewrites31.0%

                                                    \[\leadsto \frac{0.3333333333333333}{a} \cdot \left(\sqrt{\mathsf{fma}\left(c \cdot -3, a, b \cdot b\right)} - b\right) \]

                                                  if -3e-9 < (/.f64 (+.f64 (neg.f64 b) (sqrt.f64 (-.f64 (*.f64 b b) (*.f64 (*.f64 #s(literal 3 binary64) a) c)))) (*.f64 #s(literal 3 binary64) a))

                                                  1. Initial program 31.0%

                                                    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                                                  2. Taylor expanded in b around inf

                                                    \[\leadsto \frac{-1}{2} \cdot \frac{c}{b} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites81.6%

                                                      \[\leadsto -0.5 \cdot \frac{c}{b} \]
                                                  4. Recombined 2 regimes into one program.
                                                  5. Add Preprocessing

                                                  Alternative 12: 81.6% accurate, 3.2× speedup?

                                                  \[\left(\left(1.1102230246251565 \cdot 10^{-16} < a \land a < 9007199254740992\right) \land \left(1.1102230246251565 \cdot 10^{-16} < b \land b < 9007199254740992\right)\right) \land \left(1.1102230246251565 \cdot 10^{-16} < c \land c < 9007199254740992\right)\]
                                                  \[-0.5 \cdot \frac{c}{b} \]
                                                  (FPCore (a b c)
                                                    :precision binary64
                                                    :pre (and (and (and (< 1.1102230246251565e-16 a)
                                                                 (< a 9007199254740992.0))
                                                            (and (< 1.1102230246251565e-16 b)
                                                                 (< b 9007199254740992.0)))
                                                       (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
                                                    (* -0.5 (/ c b)))
                                                  double code(double a, double b, double c) {
                                                  	return -0.5 * (c / b);
                                                  }
                                                  
                                                  real(8) function code(a, b, c)
                                                  use fmin_fmax_functions
                                                      real(8), intent (in) :: a
                                                      real(8), intent (in) :: b
                                                      real(8), intent (in) :: c
                                                      code = (-0.5d0) * (c / b)
                                                  end function
                                                  
                                                  public static double code(double a, double b, double c) {
                                                  	return -0.5 * (c / b);
                                                  }
                                                  
                                                  def code(a, b, c):
                                                  	return -0.5 * (c / b)
                                                  
                                                  function code(a, b, c)
                                                  	return Float64(-0.5 * Float64(c / b))
                                                  end
                                                  
                                                  function tmp = code(a, b, c)
                                                  	tmp = -0.5 * (c / b);
                                                  end
                                                  
                                                  code[a_, b_, c_] := N[(-0.5 * N[(c / b), $MachinePrecision]), $MachinePrecision]
                                                  
                                                  f(a, b, c):
                                                  	a in [11102230246251565404236316680908203125e-53, 9007199254740992],
                                                  	b in [11102230246251565404236316680908203125e-53, 9007199254740992],
                                                  	c in [11102230246251565404236316680908203125e-53, 9007199254740992]
                                                  code: THEORY
                                                  BEGIN
                                                  f(a, b, c: real): real =
                                                  	(-5e-1) * (c / b)
                                                  END code
                                                  -0.5 \cdot \frac{c}{b}
                                                  
                                                  Derivation
                                                  1. Initial program 31.0%

                                                    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
                                                  2. Taylor expanded in b around inf

                                                    \[\leadsto \frac{-1}{2} \cdot \frac{c}{b} \]
                                                  3. Step-by-step derivation
                                                    1. Applied rewrites81.6%

                                                      \[\leadsto -0.5 \cdot \frac{c}{b} \]
                                                    2. Add Preprocessing

                                                    Reproduce

                                                    ?
                                                    herbie shell --seed 2026047 
                                                    (FPCore (a b c)
                                                      :name "Cubic critical, medium range"
                                                      :precision binary64
                                                      :pre (and (and (and (< 1.1102230246251565e-16 a) (< a 9007199254740992.0)) (and (< 1.1102230246251565e-16 b) (< b 9007199254740992.0))) (and (< 1.1102230246251565e-16 c) (< c 9007199254740992.0)))
                                                      (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))