Cubic critical, wide range

Percentage Accurate: 17.3% → 97.6%
Time: 22.4s
Alternatives: 12
Speedup: 23.2×

Specification

?
\[\left(\left(4.930380657631324 \cdot 10^{-32} < a \land a < 2.028240960365167 \cdot 10^{+31}\right) \land \left(4.930380657631324 \cdot 10^{-32} < b \land b < 2.028240960365167 \cdot 10^{+31}\right)\right) \land \left(4.930380657631324 \cdot 10^{-32} < c \land c < 2.028240960365167 \cdot 10^{+31}\right)\]
\[\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 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: 17.3% 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: 97.6% accurate, 0.8× speedup?

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

\\
\frac{c \cdot -0.5}{b} + a \cdot \left(\left(c \cdot c\right) \cdot \frac{\left(c \cdot c\right) \cdot \left(-1.0546875 \cdot \left(a \cdot a\right)\right) + \left(b \cdot b\right) \cdot \left(\left(c \cdot a\right) \cdot -0.5625 + \left(b \cdot b\right) \cdot -0.375\right)}{{b}^{7}}\right)
\end{array}
Derivation
  1. Initial program 17.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. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), \color{blue}{\left(3 \cdot a\right)}\right) \]
    2. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    3. unsub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    6. sub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    10. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    16. *-lowering-*.f6417.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
  3. Simplified17.8%

    \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Taylor expanded in a around 0

    \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b} + a \cdot \left(\frac{-3}{8} \cdot \frac{{c}^{2}}{{b}^{3}} + a \cdot \left(\frac{-9}{16} \cdot \frac{{c}^{3}}{{b}^{5}} + \frac{-1}{6} \cdot \frac{a \cdot \left(\frac{81}{64} \cdot \frac{{c}^{4}}{{b}^{6}} + \frac{81}{16} \cdot \frac{{c}^{4}}{{b}^{6}}\right)}{b}\right)\right)} \]
  6. Simplified97.4%

    \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b} + a \cdot \left(\frac{-0.375 \cdot \left(c \cdot c\right)}{b \cdot \left(b \cdot b\right)} + a \cdot \left(\frac{\left(-0.5625 \cdot c\right) \cdot \left(c \cdot c\right)}{{b}^{5}} + \frac{\left(-0.16666666666666666 \cdot a\right) \cdot \frac{{c}^{4} \cdot 6.328125}{{b}^{6}}}{b}\right)\right)} \]
  7. Taylor expanded in c around 0

    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \color{blue}{\left({c}^{2} \cdot \left(c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right) - \frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)}\right)\right) \]
  8. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left({c}^{2}\right), \color{blue}{\left(c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right) - \frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)}\right)\right)\right) \]
    2. unpow2N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(c \cdot c\right), \left(\color{blue}{c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right)} - \frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \left(\color{blue}{c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right)} - \frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{\_.f64}\left(\left(c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right)\right), \color{blue}{\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)}\right)\right)\right)\right) \]
  9. Simplified97.4%

    \[\leadsto \frac{c \cdot -0.5}{b} + a \cdot \color{blue}{\left(\left(c \cdot c\right) \cdot \left(c \cdot \left(\frac{-1.0546875 \cdot \left(c \cdot \left(a \cdot a\right)\right)}{{b}^{7}} + \frac{-0.5625 \cdot a}{{b}^{5}}\right) - \frac{0.375}{b \cdot \left(b \cdot b\right)}\right)\right)} \]
  10. Taylor expanded in b around 0

    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \color{blue}{\left(\frac{\frac{-135}{128} \cdot \left({a}^{2} \cdot {c}^{2}\right) + {b}^{2} \cdot \left(\frac{-9}{16} \cdot \left(a \cdot c\right) + \frac{-3}{8} \cdot {b}^{2}\right)}{{b}^{7}}\right)}\right)\right)\right) \]
  11. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\left(\frac{-135}{128} \cdot \left({a}^{2} \cdot {c}^{2}\right) + {b}^{2} \cdot \left(\frac{-9}{16} \cdot \left(a \cdot c\right) + \frac{-3}{8} \cdot {b}^{2}\right)\right), \color{blue}{\left({b}^{7}\right)}\right)\right)\right)\right) \]
  12. Simplified97.4%

    \[\leadsto \frac{c \cdot -0.5}{b} + a \cdot \left(\left(c \cdot c\right) \cdot \color{blue}{\frac{\left(-1.0546875 \cdot \left(a \cdot a\right)\right) \cdot \left(c \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(c \cdot a\right) \cdot -0.5625 + -0.375 \cdot \left(b \cdot b\right)\right)}{{b}^{7}}}\right) \]
  13. Final simplification97.4%

    \[\leadsto \frac{c \cdot -0.5}{b} + a \cdot \left(\left(c \cdot c\right) \cdot \frac{\left(c \cdot c\right) \cdot \left(-1.0546875 \cdot \left(a \cdot a\right)\right) + \left(b \cdot b\right) \cdot \left(\left(c \cdot a\right) \cdot -0.5625 + \left(b \cdot b\right) \cdot -0.375\right)}{{b}^{7}}\right) \]
  14. Add Preprocessing

Alternative 2: 97.3% accurate, 0.8× speedup?

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

\\
c \cdot \left(\frac{-0.5}{b} + a \cdot \frac{c}{\frac{{b}^{7}}{\left(a \cdot a\right) \cdot \left(\left(c \cdot c\right) \cdot -1.0546875\right) + \left(b \cdot b\right) \cdot \left(c \cdot \left(a \cdot -0.5625\right) + b \cdot \left(b \cdot -0.375\right)\right)}}\right)
\end{array}
Derivation
  1. Initial program 17.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. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), \color{blue}{\left(3 \cdot a\right)}\right) \]
    2. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    3. unsub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    6. sub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    10. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    16. *-lowering-*.f6417.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
  3. Simplified17.8%

    \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Taylor expanded in a around 0

    \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b} + a \cdot \left(\frac{-3}{8} \cdot \frac{{c}^{2}}{{b}^{3}} + a \cdot \left(\frac{-9}{16} \cdot \frac{{c}^{3}}{{b}^{5}} + \frac{-1}{6} \cdot \frac{a \cdot \left(\frac{81}{64} \cdot \frac{{c}^{4}}{{b}^{6}} + \frac{81}{16} \cdot \frac{{c}^{4}}{{b}^{6}}\right)}{b}\right)\right)} \]
  6. Simplified97.4%

    \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b} + a \cdot \left(\frac{-0.375 \cdot \left(c \cdot c\right)}{b \cdot \left(b \cdot b\right)} + a \cdot \left(\frac{\left(-0.5625 \cdot c\right) \cdot \left(c \cdot c\right)}{{b}^{5}} + \frac{\left(-0.16666666666666666 \cdot a\right) \cdot \frac{{c}^{4} \cdot 6.328125}{{b}^{6}}}{b}\right)\right)} \]
  7. Taylor expanded in c around 0

    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \color{blue}{\left({c}^{2} \cdot \left(c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right) - \frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)}\right)\right) \]
  8. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left({c}^{2}\right), \color{blue}{\left(c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right) - \frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)}\right)\right)\right) \]
    2. unpow2N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(c \cdot c\right), \left(\color{blue}{c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right)} - \frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \left(\color{blue}{c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right)} - \frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{\_.f64}\left(\left(c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right)\right), \color{blue}{\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)}\right)\right)\right)\right) \]
  9. Simplified97.4%

    \[\leadsto \frac{c \cdot -0.5}{b} + a \cdot \color{blue}{\left(\left(c \cdot c\right) \cdot \left(c \cdot \left(\frac{-1.0546875 \cdot \left(c \cdot \left(a \cdot a\right)\right)}{{b}^{7}} + \frac{-0.5625 \cdot a}{{b}^{5}}\right) - \frac{0.375}{b \cdot \left(b \cdot b\right)}\right)\right)} \]
  10. Taylor expanded in b around 0

    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \color{blue}{\left(\frac{\frac{-135}{128} \cdot \left({a}^{2} \cdot {c}^{2}\right) + {b}^{2} \cdot \left(\frac{-9}{16} \cdot \left(a \cdot c\right) + \frac{-3}{8} \cdot {b}^{2}\right)}{{b}^{7}}\right)}\right)\right)\right) \]
  11. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\left(\frac{-135}{128} \cdot \left({a}^{2} \cdot {c}^{2}\right) + {b}^{2} \cdot \left(\frac{-9}{16} \cdot \left(a \cdot c\right) + \frac{-3}{8} \cdot {b}^{2}\right)\right), \color{blue}{\left({b}^{7}\right)}\right)\right)\right)\right) \]
  12. Simplified97.4%

    \[\leadsto \frac{c \cdot -0.5}{b} + a \cdot \left(\left(c \cdot c\right) \cdot \color{blue}{\frac{\left(-1.0546875 \cdot \left(a \cdot a\right)\right) \cdot \left(c \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(c \cdot a\right) \cdot -0.5625 + -0.375 \cdot \left(b \cdot b\right)\right)}{{b}^{7}}}\right) \]
  13. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto c \cdot \frac{\frac{-1}{2}}{b} + \color{blue}{a} \cdot \left(\left(c \cdot c\right) \cdot \frac{\left(\frac{-135}{128} \cdot \left(a \cdot a\right)\right) \cdot \left(c \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(c \cdot a\right) \cdot \frac{-9}{16} + \frac{-3}{8} \cdot \left(b \cdot b\right)\right)}{{b}^{7}}\right) \]
    2. *-commutativeN/A

      \[\leadsto c \cdot \frac{\frac{-1}{2}}{b} + \left(\left(c \cdot c\right) \cdot \frac{\left(\frac{-135}{128} \cdot \left(a \cdot a\right)\right) \cdot \left(c \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(c \cdot a\right) \cdot \frac{-9}{16} + \frac{-3}{8} \cdot \left(b \cdot b\right)\right)}{{b}^{7}}\right) \cdot \color{blue}{a} \]
    3. associate-*l*N/A

      \[\leadsto c \cdot \frac{\frac{-1}{2}}{b} + \left(c \cdot \left(c \cdot \frac{\left(\frac{-135}{128} \cdot \left(a \cdot a\right)\right) \cdot \left(c \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(c \cdot a\right) \cdot \frac{-9}{16} + \frac{-3}{8} \cdot \left(b \cdot b\right)\right)}{{b}^{7}}\right)\right) \cdot a \]
    4. associate-*l*N/A

      \[\leadsto c \cdot \frac{\frac{-1}{2}}{b} + c \cdot \color{blue}{\left(\left(c \cdot \frac{\left(\frac{-135}{128} \cdot \left(a \cdot a\right)\right) \cdot \left(c \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(c \cdot a\right) \cdot \frac{-9}{16} + \frac{-3}{8} \cdot \left(b \cdot b\right)\right)}{{b}^{7}}\right) \cdot a\right)} \]
    5. distribute-lft-outN/A

      \[\leadsto c \cdot \color{blue}{\left(\frac{\frac{-1}{2}}{b} + \left(c \cdot \frac{\left(\frac{-135}{128} \cdot \left(a \cdot a\right)\right) \cdot \left(c \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(c \cdot a\right) \cdot \frac{-9}{16} + \frac{-3}{8} \cdot \left(b \cdot b\right)\right)}{{b}^{7}}\right) \cdot a\right)} \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(c, \color{blue}{\left(\frac{\frac{-1}{2}}{b} + \left(c \cdot \frac{\left(\frac{-135}{128} \cdot \left(a \cdot a\right)\right) \cdot \left(c \cdot c\right) + \left(b \cdot b\right) \cdot \left(\left(c \cdot a\right) \cdot \frac{-9}{16} + \frac{-3}{8} \cdot \left(b \cdot b\right)\right)}{{b}^{7}}\right) \cdot a\right)}\right) \]
  14. Applied egg-rr97.0%

    \[\leadsto \color{blue}{c \cdot \left(\frac{-0.5}{b} + \frac{c}{\frac{{b}^{7}}{\left(a \cdot a\right) \cdot \left(-1.0546875 \cdot \left(c \cdot c\right)\right) + \left(b \cdot b\right) \cdot \left(c \cdot \left(a \cdot -0.5625\right) + b \cdot \left(b \cdot -0.375\right)\right)}} \cdot a\right)} \]
  15. Final simplification97.0%

    \[\leadsto c \cdot \left(\frac{-0.5}{b} + a \cdot \frac{c}{\frac{{b}^{7}}{\left(a \cdot a\right) \cdot \left(\left(c \cdot c\right) \cdot -1.0546875\right) + \left(b \cdot b\right) \cdot \left(c \cdot \left(a \cdot -0.5625\right) + b \cdot \left(b \cdot -0.375\right)\right)}}\right) \]
  16. Add Preprocessing

Alternative 3: 96.8% accurate, 4.0× speedup?

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

\\
\frac{c \cdot -0.5}{b} + a \cdot \left(\left(c \cdot c\right) \cdot \frac{-0.375 + \frac{\left(c \cdot a\right) \cdot -0.5625}{b \cdot b}}{b \cdot \left(b \cdot b\right)}\right)
\end{array}
Derivation
  1. Initial program 17.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. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), \color{blue}{\left(3 \cdot a\right)}\right) \]
    2. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    3. unsub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    6. sub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    10. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    16. *-lowering-*.f6417.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
  3. Simplified17.8%

    \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Taylor expanded in a around 0

    \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b} + a \cdot \left(\frac{-3}{8} \cdot \frac{{c}^{2}}{{b}^{3}} + a \cdot \left(\frac{-9}{16} \cdot \frac{{c}^{3}}{{b}^{5}} + \frac{-1}{6} \cdot \frac{a \cdot \left(\frac{81}{64} \cdot \frac{{c}^{4}}{{b}^{6}} + \frac{81}{16} \cdot \frac{{c}^{4}}{{b}^{6}}\right)}{b}\right)\right)} \]
  6. Simplified97.4%

    \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b} + a \cdot \left(\frac{-0.375 \cdot \left(c \cdot c\right)}{b \cdot \left(b \cdot b\right)} + a \cdot \left(\frac{\left(-0.5625 \cdot c\right) \cdot \left(c \cdot c\right)}{{b}^{5}} + \frac{\left(-0.16666666666666666 \cdot a\right) \cdot \frac{{c}^{4} \cdot 6.328125}{{b}^{6}}}{b}\right)\right)} \]
  7. Taylor expanded in c around 0

    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \color{blue}{\left({c}^{2} \cdot \left(c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right) - \frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)}\right)\right) \]
  8. Step-by-step derivation
    1. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left({c}^{2}\right), \color{blue}{\left(c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right) - \frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)}\right)\right)\right) \]
    2. unpow2N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\left(c \cdot c\right), \left(\color{blue}{c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right)} - \frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)\right)\right) \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \left(\color{blue}{c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right)} - \frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)\right)\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{\_.f64}\left(\left(c \cdot \left(\frac{-135}{128} \cdot \frac{{a}^{2} \cdot c}{{b}^{7}} + \frac{-9}{16} \cdot \frac{a}{{b}^{5}}\right)\right), \color{blue}{\left(\frac{3}{8} \cdot \frac{1}{{b}^{3}}\right)}\right)\right)\right)\right) \]
  9. Simplified97.4%

    \[\leadsto \frac{c \cdot -0.5}{b} + a \cdot \color{blue}{\left(\left(c \cdot c\right) \cdot \left(c \cdot \left(\frac{-1.0546875 \cdot \left(c \cdot \left(a \cdot a\right)\right)}{{b}^{7}} + \frac{-0.5625 \cdot a}{{b}^{5}}\right) - \frac{0.375}{b \cdot \left(b \cdot b\right)}\right)\right)} \]
  10. Taylor expanded in b around inf

    \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \color{blue}{\left(\frac{\frac{-9}{16} \cdot \frac{a \cdot c}{{b}^{2}} - \frac{3}{8}}{{b}^{3}}\right)}\right)\right)\right) \]
  11. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\left(\frac{-9}{16} \cdot \frac{a \cdot c}{{b}^{2}} - \frac{3}{8}\right), \color{blue}{\left({b}^{3}\right)}\right)\right)\right)\right) \]
    2. sub-negN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\left(\frac{-9}{16} \cdot \frac{a \cdot c}{{b}^{2}} + \left(\mathsf{neg}\left(\frac{3}{8}\right)\right)\right), \left({\color{blue}{b}}^{3}\right)\right)\right)\right)\right) \]
    3. metadata-evalN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\left(\frac{-9}{16} \cdot \frac{a \cdot c}{{b}^{2}} + \frac{-3}{8}\right), \left({b}^{3}\right)\right)\right)\right)\right) \]
    4. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{-9}{16} \cdot \frac{a \cdot c}{{b}^{2}}\right), \frac{-3}{8}\right), \left({\color{blue}{b}}^{3}\right)\right)\right)\right)\right) \]
    5. associate-*r/N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{-9}{16} \cdot \left(a \cdot c\right)}{{b}^{2}}\right), \frac{-3}{8}\right), \left({b}^{3}\right)\right)\right)\right)\right) \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{-9}{16} \cdot \left(a \cdot c\right)\right), \left({b}^{2}\right)\right), \frac{-3}{8}\right), \left({b}^{3}\right)\right)\right)\right)\right) \]
    7. *-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\left(a \cdot c\right) \cdot \frac{-9}{16}\right), \left({b}^{2}\right)\right), \frac{-3}{8}\right), \left({b}^{3}\right)\right)\right)\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(a \cdot c\right), \frac{-9}{16}\right), \left({b}^{2}\right)\right), \frac{-3}{8}\right), \left({b}^{3}\right)\right)\right)\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\left(c \cdot a\right), \frac{-9}{16}\right), \left({b}^{2}\right)\right), \frac{-3}{8}\right), \left({b}^{3}\right)\right)\right)\right)\right) \]
    10. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c, a\right), \frac{-9}{16}\right), \left({b}^{2}\right)\right), \frac{-3}{8}\right), \left({b}^{3}\right)\right)\right)\right)\right) \]
    11. unpow2N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c, a\right), \frac{-9}{16}\right), \left(b \cdot b\right)\right), \frac{-3}{8}\right), \left({b}^{3}\right)\right)\right)\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c, a\right), \frac{-9}{16}\right), \mathsf{*.f64}\left(b, b\right)\right), \frac{-3}{8}\right), \left({b}^{3}\right)\right)\right)\right)\right) \]
    13. cube-multN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c, a\right), \frac{-9}{16}\right), \mathsf{*.f64}\left(b, b\right)\right), \frac{-3}{8}\right), \left(b \cdot \color{blue}{\left(b \cdot b\right)}\right)\right)\right)\right)\right) \]
    14. unpow2N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c, a\right), \frac{-9}{16}\right), \mathsf{*.f64}\left(b, b\right)\right), \frac{-3}{8}\right), \left(b \cdot {b}^{\color{blue}{2}}\right)\right)\right)\right)\right) \]
    15. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c, a\right), \frac{-9}{16}\right), \mathsf{*.f64}\left(b, b\right)\right), \frac{-3}{8}\right), \mathsf{*.f64}\left(b, \color{blue}{\left({b}^{2}\right)}\right)\right)\right)\right)\right) \]
    16. unpow2N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c, a\right), \frac{-9}{16}\right), \mathsf{*.f64}\left(b, b\right)\right), \frac{-3}{8}\right), \mathsf{*.f64}\left(b, \left(b \cdot \color{blue}{b}\right)\right)\right)\right)\right)\right) \]
    17. *-lowering-*.f6496.4%

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{*.f64}\left(a, \mathsf{*.f64}\left(\mathsf{*.f64}\left(c, c\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\mathsf{*.f64}\left(c, a\right), \frac{-9}{16}\right), \mathsf{*.f64}\left(b, b\right)\right), \frac{-3}{8}\right), \mathsf{*.f64}\left(b, \mathsf{*.f64}\left(b, \color{blue}{b}\right)\right)\right)\right)\right)\right) \]
  12. Simplified96.4%

    \[\leadsto \frac{c \cdot -0.5}{b} + a \cdot \left(\left(c \cdot c\right) \cdot \color{blue}{\frac{\frac{\left(c \cdot a\right) \cdot -0.5625}{b \cdot b} + -0.375}{b \cdot \left(b \cdot b\right)}}\right) \]
  13. Final simplification96.4%

    \[\leadsto \frac{c \cdot -0.5}{b} + a \cdot \left(\left(c \cdot c\right) \cdot \frac{-0.375 + \frac{\left(c \cdot a\right) \cdot -0.5625}{b \cdot b}}{b \cdot \left(b \cdot b\right)}\right) \]
  14. Add Preprocessing

Alternative 4: 95.3% accurate, 6.1× speedup?

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

\\
\frac{c \cdot -0.5}{b} + \frac{-0.375 \cdot \left(c \cdot \left(c \cdot a\right)\right)}{b \cdot \left(b \cdot b\right)}
\end{array}
Derivation
  1. Initial program 17.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. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), \color{blue}{\left(3 \cdot a\right)}\right) \]
    2. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    3. unsub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    6. sub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    10. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    16. *-lowering-*.f6417.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
  3. Simplified17.8%

    \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Taylor expanded in a around 0

    \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b} + \frac{-3}{8} \cdot \frac{a \cdot {c}^{2}}{{b}^{3}}} \]
  6. Step-by-step derivation
    1. *-commutativeN/A

      \[\leadsto \frac{-1}{2} \cdot \frac{c}{b} + \frac{a \cdot {c}^{2}}{{b}^{3}} \cdot \color{blue}{\frac{-3}{8}} \]
    2. associate-/l*N/A

      \[\leadsto \frac{-1}{2} \cdot \frac{c}{b} + \left(a \cdot \frac{{c}^{2}}{{b}^{3}}\right) \cdot \frac{-3}{8} \]
    3. associate-*r*N/A

      \[\leadsto \frac{-1}{2} \cdot \frac{c}{b} + a \cdot \color{blue}{\left(\frac{{c}^{2}}{{b}^{3}} \cdot \frac{-3}{8}\right)} \]
    4. *-commutativeN/A

      \[\leadsto \frac{-1}{2} \cdot \frac{c}{b} + a \cdot \left(\frac{-3}{8} \cdot \color{blue}{\frac{{c}^{2}}{{b}^{3}}}\right) \]
    5. +-lowering-+.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot \frac{c}{b}\right), \color{blue}{\left(a \cdot \left(\frac{-3}{8} \cdot \frac{{c}^{2}}{{b}^{3}}\right)\right)}\right) \]
    6. associate-*r/N/A

      \[\leadsto \mathsf{+.f64}\left(\left(\frac{\frac{-1}{2} \cdot c}{b}\right), \left(\color{blue}{a} \cdot \left(\frac{-3}{8} \cdot \frac{{c}^{2}}{{b}^{3}}\right)\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot c\right), b\right), \left(\color{blue}{a} \cdot \left(\frac{-3}{8} \cdot \frac{{c}^{2}}{{b}^{3}}\right)\right)\right) \]
    8. *-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(c \cdot \frac{-1}{2}\right), b\right), \left(a \cdot \left(\frac{-3}{8} \cdot \frac{{c}^{2}}{{b}^{3}}\right)\right)\right) \]
    9. *-lowering-*.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \left(a \cdot \left(\frac{-3}{8} \cdot \frac{{c}^{2}}{{b}^{3}}\right)\right)\right) \]
    10. *-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \left(a \cdot \left(\frac{{c}^{2}}{{b}^{3}} \cdot \color{blue}{\frac{-3}{8}}\right)\right)\right) \]
    11. associate-*r*N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \left(\left(a \cdot \frac{{c}^{2}}{{b}^{3}}\right) \cdot \color{blue}{\frac{-3}{8}}\right)\right) \]
    12. associate-/l*N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \left(\frac{a \cdot {c}^{2}}{{b}^{3}} \cdot \frac{-3}{8}\right)\right) \]
    13. *-commutativeN/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \left(\frac{-3}{8} \cdot \color{blue}{\frac{a \cdot {c}^{2}}{{b}^{3}}}\right)\right) \]
    14. associate-*r/N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \left(\frac{\frac{-3}{8} \cdot \left(a \cdot {c}^{2}\right)}{\color{blue}{{b}^{3}}}\right)\right) \]
    15. /-lowering-/.f64N/A

      \[\leadsto \mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right), \mathsf{/.f64}\left(\left(\frac{-3}{8} \cdot \left(a \cdot {c}^{2}\right)\right), \color{blue}{\left({b}^{3}\right)}\right)\right) \]
  7. Simplified94.7%

    \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b} + \frac{-0.375 \cdot \left(c \cdot \left(c \cdot a\right)\right)}{b \cdot \left(b \cdot b\right)}} \]
  8. Add Preprocessing

Alternative 5: 95.3% accurate, 6.8× speedup?

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

\\
\frac{c \cdot -0.5 + \frac{-0.375 \cdot \left(c \cdot \left(c \cdot a\right)\right)}{b \cdot b}}{b}
\end{array}
Derivation
  1. Initial program 17.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. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), \color{blue}{\left(3 \cdot a\right)}\right) \]
    2. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    3. unsub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    6. sub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    10. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    16. *-lowering-*.f6417.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
  3. Simplified17.8%

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

    \[\leadsto \color{blue}{\frac{\frac{-1}{2} \cdot c + \frac{-3}{8} \cdot \frac{a \cdot {c}^{2}}{{b}^{2}}}{b}} \]
  6. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot c + \frac{-3}{8} \cdot \frac{a \cdot {c}^{2}}{{b}^{2}}\right), \color{blue}{b}\right) \]
    2. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{-1}{2} \cdot c\right), \left(\frac{-3}{8} \cdot \frac{a \cdot {c}^{2}}{{b}^{2}}\right)\right), b\right) \]
    3. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(c \cdot \frac{-1}{2}\right), \left(\frac{-3}{8} \cdot \frac{a \cdot {c}^{2}}{{b}^{2}}\right)\right), b\right) \]
    4. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), \left(\frac{-3}{8} \cdot \frac{a \cdot {c}^{2}}{{b}^{2}}\right)\right), b\right) \]
    5. associate-*r/N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), \left(\frac{\frac{-3}{8} \cdot \left(a \cdot {c}^{2}\right)}{{b}^{2}}\right)\right), b\right) \]
    6. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), \mathsf{/.f64}\left(\left(\frac{-3}{8} \cdot \left(a \cdot {c}^{2}\right)\right), \left({b}^{2}\right)\right)\right), b\right) \]
    7. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-3}{8}, \left(a \cdot {c}^{2}\right)\right), \left({b}^{2}\right)\right)\right), b\right) \]
    8. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-3}{8}, \left({c}^{2} \cdot a\right)\right), \left({b}^{2}\right)\right)\right), b\right) \]
    9. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-3}{8}, \left(\left(c \cdot c\right) \cdot a\right)\right), \left({b}^{2}\right)\right)\right), b\right) \]
    10. associate-*l*N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-3}{8}, \left(c \cdot \left(c \cdot a\right)\right)\right), \left({b}^{2}\right)\right)\right), b\right) \]
    11. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-3}{8}, \left(c \cdot \left(a \cdot c\right)\right)\right), \left({b}^{2}\right)\right)\right), b\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-3}{8}, \mathsf{*.f64}\left(c, \left(a \cdot c\right)\right)\right), \left({b}^{2}\right)\right)\right), b\right) \]
    13. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-3}{8}, \mathsf{*.f64}\left(c, \left(c \cdot a\right)\right)\right), \left({b}^{2}\right)\right)\right), b\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-3}{8}, \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(c, a\right)\right)\right), \left({b}^{2}\right)\right)\right), b\right) \]
    15. unpow2N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-3}{8}, \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(c, a\right)\right)\right), \left(b \cdot b\right)\right)\right), b\right) \]
    16. *-lowering-*.f6494.7%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-3}{8}, \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(c, a\right)\right)\right), \mathsf{*.f64}\left(b, b\right)\right)\right), b\right) \]
  7. Simplified94.7%

    \[\leadsto \color{blue}{\frac{c \cdot -0.5 + \frac{-0.375 \cdot \left(c \cdot \left(c \cdot a\right)\right)}{b \cdot b}}{b}} \]
  8. Add Preprocessing

Alternative 6: 95.0% accurate, 6.8× speedup?

\[\begin{array}{l} \\ \frac{c}{\frac{a}{-0.3333333333333333} \cdot \left(\frac{c}{\frac{b}{-0.5}} + \frac{b \cdot 0.6666666666666666}{a}\right)} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/
  c
  (*
   (/ a -0.3333333333333333)
   (+ (/ c (/ b -0.5)) (/ (* b 0.6666666666666666) a)))))
double code(double a, double b, double c) {
	return c / ((a / -0.3333333333333333) * ((c / (b / -0.5)) + ((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 = c / ((a / (-0.3333333333333333d0)) * ((c / (b / (-0.5d0))) + ((b * 0.6666666666666666d0) / a)))
end function
public static double code(double a, double b, double c) {
	return c / ((a / -0.3333333333333333) * ((c / (b / -0.5)) + ((b * 0.6666666666666666) / a)));
}
def code(a, b, c):
	return c / ((a / -0.3333333333333333) * ((c / (b / -0.5)) + ((b * 0.6666666666666666) / a)))
function code(a, b, c)
	return Float64(c / Float64(Float64(a / -0.3333333333333333) * Float64(Float64(c / Float64(b / -0.5)) + Float64(Float64(b * 0.6666666666666666) / a))))
end
function tmp = code(a, b, c)
	tmp = c / ((a / -0.3333333333333333) * ((c / (b / -0.5)) + ((b * 0.6666666666666666) / a)));
end
code[a_, b_, c_] := N[(c / N[(N[(a / -0.3333333333333333), $MachinePrecision] * N[(N[(c / N[(b / -0.5), $MachinePrecision]), $MachinePrecision] + N[(N[(b * 0.6666666666666666), $MachinePrecision] / a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{c}{\frac{a}{-0.3333333333333333} \cdot \left(\frac{c}{\frac{b}{-0.5}} + \frac{b \cdot 0.6666666666666666}{a}\right)}
\end{array}
Derivation
  1. Initial program 17.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. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), \color{blue}{\left(3 \cdot a\right)}\right) \]
    2. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    3. unsub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    6. sub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    10. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    16. *-lowering-*.f6417.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
  3. Simplified17.8%

    \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. remove-double-negN/A

      \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
    2. sub-divN/A

      \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
    3. remove-double-negN/A

      \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
    4. div-subN/A

      \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{\color{blue}{3 \cdot a}} \]
    5. clear-numN/A

      \[\leadsto \frac{1}{\color{blue}{\frac{3 \cdot a}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}}} \]
    6. div-invN/A

      \[\leadsto \frac{1}{\left(3 \cdot a\right) \cdot \color{blue}{\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}}} \]
    7. associate-/r*N/A

      \[\leadsto \frac{\frac{1}{3 \cdot a}}{\color{blue}{\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}}} \]
    8. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{3 \cdot a}\right), \color{blue}{\left(\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}\right)}\right) \]
    9. associate-/r*N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{3}}{a}\right), \left(\frac{\color{blue}{1}}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}\right)\right) \]
    10. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{3}\right), a\right), \left(\frac{\color{blue}{1}}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}\right)\right) \]
    11. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \left(\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}\right)\right) \]
    12. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(1, \color{blue}{\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b\right)}\right)\right) \]
  6. Applied egg-rr17.8%

    \[\leadsto \color{blue}{\frac{\frac{0.3333333333333333}{a}}{\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}}} \]
  7. Taylor expanded in c around 0

    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \color{blue}{\left(\frac{\frac{-2}{3} \cdot \frac{b}{a} + \frac{1}{2} \cdot \frac{c}{b}}{c}\right)}\right) \]
  8. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\left(\frac{-2}{3} \cdot \frac{b}{a} + \frac{1}{2} \cdot \frac{c}{b}\right), \color{blue}{c}\right)\right) \]
    2. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{-2}{3} \cdot \frac{b}{a}\right), \left(\frac{1}{2} \cdot \frac{c}{b}\right)\right), c\right)\right) \]
    3. associate-*r/N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{-2}{3} \cdot b}{a}\right), \left(\frac{1}{2} \cdot \frac{c}{b}\right)\right), c\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{-2}{3} \cdot b\right), a\right), \left(\frac{1}{2} \cdot \frac{c}{b}\right)\right), c\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \left(\frac{1}{2} \cdot \frac{c}{b}\right)\right), c\right)\right) \]
    6. associate-*r/N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \left(\frac{\frac{1}{2} \cdot c}{b}\right)\right), c\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot c\right), b\right)\right), c\right)\right) \]
    8. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \mathsf{/.f64}\left(\left(c \cdot \frac{1}{2}\right), b\right)\right), c\right)\right) \]
    9. *-lowering-*.f6494.3%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{1}{2}\right), b\right)\right), c\right)\right) \]
  9. Simplified94.3%

    \[\leadsto \frac{\frac{0.3333333333333333}{a}}{\color{blue}{\frac{\frac{-0.6666666666666666 \cdot b}{a} + \frac{c \cdot 0.5}{b}}{c}}} \]
  10. Step-by-step derivation
    1. div-invN/A

      \[\leadsto \frac{\frac{1}{3}}{a} \cdot \color{blue}{\frac{1}{\frac{\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}}{c}}} \]
    2. metadata-evalN/A

      \[\leadsto \frac{\mathsf{neg}\left(\frac{-1}{3}\right)}{a} \cdot \frac{1}{\frac{\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}}{c}} \]
    3. distribute-neg-fracN/A

      \[\leadsto \left(\mathsf{neg}\left(\frac{\frac{-1}{3}}{a}\right)\right) \cdot \frac{\color{blue}{1}}{\frac{\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}}{c}} \]
    4. clear-numN/A

      \[\leadsto \left(\mathsf{neg}\left(\frac{1}{\frac{a}{\frac{-1}{3}}}\right)\right) \cdot \frac{1}{\frac{\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}}{c}} \]
    5. distribute-neg-fracN/A

      \[\leadsto \frac{\mathsf{neg}\left(1\right)}{\frac{a}{\frac{-1}{3}}} \cdot \frac{\color{blue}{1}}{\frac{\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}}{c}} \]
    6. metadata-evalN/A

      \[\leadsto \frac{-1}{\frac{a}{\frac{-1}{3}}} \cdot \frac{1}{\frac{\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}}{c}} \]
    7. clear-numN/A

      \[\leadsto \frac{-1}{\frac{a}{\frac{-1}{3}}} \cdot \frac{c}{\color{blue}{\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}}} \]
    8. frac-2negN/A

      \[\leadsto \frac{-1}{\frac{a}{\frac{-1}{3}}} \cdot \frac{\mathsf{neg}\left(c\right)}{\color{blue}{\mathsf{neg}\left(\left(\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}\right)\right)}} \]
    9. frac-timesN/A

      \[\leadsto \frac{-1 \cdot \left(\mathsf{neg}\left(c\right)\right)}{\color{blue}{\frac{a}{\frac{-1}{3}} \cdot \left(\mathsf{neg}\left(\left(\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}\right)\right)\right)}} \]
    10. neg-mul-1N/A

      \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(c\right)\right)\right)}{\color{blue}{\frac{a}{\frac{-1}{3}}} \cdot \left(\mathsf{neg}\left(\left(\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}\right)\right)\right)} \]
    11. remove-double-negN/A

      \[\leadsto \frac{c}{\color{blue}{\frac{a}{\frac{-1}{3}}} \cdot \left(\mathsf{neg}\left(\left(\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}\right)\right)\right)} \]
    12. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(c, \color{blue}{\left(\frac{a}{\frac{-1}{3}} \cdot \left(\mathsf{neg}\left(\left(\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}\right)\right)\right)\right)}\right) \]
    13. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(\left(\frac{a}{\frac{-1}{3}}\right), \color{blue}{\left(\mathsf{neg}\left(\left(\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}\right)\right)\right)}\right)\right) \]
    14. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(\mathsf{/.f64}\left(a, \frac{-1}{3}\right), \left(\mathsf{neg}\left(\color{blue}{\left(\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}\right)}\right)\right)\right)\right) \]
    15. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(\mathsf{/.f64}\left(a, \frac{-1}{3}\right), \left(\mathsf{neg}\left(\left(\frac{c \cdot \frac{1}{2}}{b} + \frac{\frac{-2}{3} \cdot b}{a}\right)\right)\right)\right)\right) \]
    16. distribute-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(\mathsf{/.f64}\left(a, \frac{-1}{3}\right), \left(\left(\mathsf{neg}\left(\frac{c \cdot \frac{1}{2}}{b}\right)\right) + \color{blue}{\left(\mathsf{neg}\left(\frac{\frac{-2}{3} \cdot b}{a}\right)\right)}\right)\right)\right) \]
  11. Applied egg-rr94.4%

    \[\leadsto \color{blue}{\frac{c}{\frac{a}{-0.3333333333333333} \cdot \left(\frac{c}{\frac{b}{-0.5}} + \frac{b \cdot 0.6666666666666666}{a}\right)}} \]
  12. Add Preprocessing

Alternative 7: 95.0% accurate, 6.8× speedup?

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

\\
c \cdot \left(\frac{-0.5}{b} + \frac{\left(c \cdot a\right) \cdot -0.375}{b \cdot \left(b \cdot b\right)}\right)
\end{array}
Derivation
  1. Initial program 17.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. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), \color{blue}{\left(3 \cdot a\right)}\right) \]
    2. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    3. unsub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    6. sub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    10. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    16. *-lowering-*.f6417.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
  3. Simplified17.8%

    \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Taylor expanded in c around 0

    \[\leadsto \color{blue}{c \cdot \left(\frac{-3}{8} \cdot \frac{a \cdot c}{{b}^{3}} - \frac{1}{2} \cdot \frac{1}{b}\right)} \]
  6. Step-by-step derivation
    1. sub-negN/A

      \[\leadsto c \cdot \left(\frac{-3}{8} \cdot \frac{a \cdot c}{{b}^{3}} + \color{blue}{\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)}\right) \]
    2. associate-*r/N/A

      \[\leadsto c \cdot \left(\frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{b}^{3}} + \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \frac{1}{b}}\right)\right)\right) \]
    3. associate-*r*N/A

      \[\leadsto c \cdot \left(\frac{\left(\frac{-3}{8} \cdot a\right) \cdot c}{{b}^{3}} + \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}} \cdot \frac{1}{b}\right)\right)\right) \]
    4. associate-*l/N/A

      \[\leadsto c \cdot \left(\frac{\frac{-3}{8} \cdot a}{{b}^{3}} \cdot c + \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2} \cdot \frac{1}{b}}\right)\right)\right) \]
    5. associate-*r/N/A

      \[\leadsto c \cdot \left(\left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) \cdot c + \left(\mathsf{neg}\left(\color{blue}{\frac{1}{2}} \cdot \frac{1}{b}\right)\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(c, \color{blue}{\left(\left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) \cdot c + \left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right)\right)}\right) \]
    7. +-commutativeN/A

      \[\leadsto \mathsf{*.f64}\left(c, \left(\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right) + \color{blue}{\left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) \cdot c}\right)\right) \]
    8. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(c, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\frac{1}{2} \cdot \frac{1}{b}\right)\right), \color{blue}{\left(\left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) \cdot c\right)}\right)\right) \]
    9. associate-*r/N/A

      \[\leadsto \mathsf{*.f64}\left(c, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\frac{\frac{1}{2} \cdot 1}{b}\right)\right), \left(\left(\color{blue}{\frac{-3}{8}} \cdot \frac{a}{{b}^{3}}\right) \cdot c\right)\right)\right) \]
    10. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(c, \mathsf{+.f64}\left(\left(\mathsf{neg}\left(\frac{\frac{1}{2}}{b}\right)\right), \left(\left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right) \cdot c\right)\right)\right) \]
    11. distribute-neg-fracN/A

      \[\leadsto \mathsf{*.f64}\left(c, \mathsf{+.f64}\left(\left(\frac{\mathsf{neg}\left(\frac{1}{2}\right)}{b}\right), \left(\color{blue}{\left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right)} \cdot c\right)\right)\right) \]
    12. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(c, \mathsf{+.f64}\left(\left(\frac{\frac{-1}{2}}{b}\right), \left(\left(\color{blue}{\frac{-3}{8}} \cdot \frac{a}{{b}^{3}}\right) \cdot c\right)\right)\right) \]
    13. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(c, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{-1}{2}, b\right), \left(\color{blue}{\left(\frac{-3}{8} \cdot \frac{a}{{b}^{3}}\right)} \cdot c\right)\right)\right) \]
    14. associate-*r/N/A

      \[\leadsto \mathsf{*.f64}\left(c, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{-1}{2}, b\right), \left(\frac{\frac{-3}{8} \cdot a}{{b}^{3}} \cdot c\right)\right)\right) \]
    15. associate-*l/N/A

      \[\leadsto \mathsf{*.f64}\left(c, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{-1}{2}, b\right), \left(\frac{\left(\frac{-3}{8} \cdot a\right) \cdot c}{\color{blue}{{b}^{3}}}\right)\right)\right) \]
    16. associate-*r*N/A

      \[\leadsto \mathsf{*.f64}\left(c, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{-1}{2}, b\right), \left(\frac{\frac{-3}{8} \cdot \left(a \cdot c\right)}{{\color{blue}{b}}^{3}}\right)\right)\right) \]
    17. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(c, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{-1}{2}, b\right), \mathsf{/.f64}\left(\left(\frac{-3}{8} \cdot \left(a \cdot c\right)\right), \color{blue}{\left({b}^{3}\right)}\right)\right)\right) \]
  7. Simplified94.3%

    \[\leadsto \color{blue}{c \cdot \left(\frac{-0.5}{b} + \frac{-0.375 \cdot \left(c \cdot a\right)}{b \cdot \left(b \cdot b\right)}\right)} \]
  8. Final simplification94.3%

    \[\leadsto c \cdot \left(\frac{-0.5}{b} + \frac{\left(c \cdot a\right) \cdot -0.375}{b \cdot \left(b \cdot b\right)}\right) \]
  9. Add Preprocessing

Alternative 8: 94.8% accurate, 6.8× speedup?

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

\\
0.3333333333333333 \cdot \frac{c}{a \cdot \left(\frac{-0.6666666666666666}{\frac{a}{b}} + \frac{c}{\frac{b}{0.5}}\right)}
\end{array}
Derivation
  1. Initial program 17.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. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), \color{blue}{\left(3 \cdot a\right)}\right) \]
    2. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    3. unsub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    6. sub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    10. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    16. *-lowering-*.f6417.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
  3. Simplified17.8%

    \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. remove-double-negN/A

      \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
    2. sub-divN/A

      \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
    3. remove-double-negN/A

      \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
    4. div-subN/A

      \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{\color{blue}{3 \cdot a}} \]
    5. clear-numN/A

      \[\leadsto \frac{1}{\color{blue}{\frac{3 \cdot a}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}}} \]
    6. div-invN/A

      \[\leadsto \frac{1}{\left(3 \cdot a\right) \cdot \color{blue}{\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}}} \]
    7. associate-/r*N/A

      \[\leadsto \frac{\frac{1}{3 \cdot a}}{\color{blue}{\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}}} \]
    8. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{3 \cdot a}\right), \color{blue}{\left(\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}\right)}\right) \]
    9. associate-/r*N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{3}}{a}\right), \left(\frac{\color{blue}{1}}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}\right)\right) \]
    10. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{3}\right), a\right), \left(\frac{\color{blue}{1}}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}\right)\right) \]
    11. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \left(\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}\right)\right) \]
    12. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(1, \color{blue}{\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b\right)}\right)\right) \]
  6. Applied egg-rr17.8%

    \[\leadsto \color{blue}{\frac{\frac{0.3333333333333333}{a}}{\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}}} \]
  7. Taylor expanded in c around 0

    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \color{blue}{\left(\frac{\frac{-2}{3} \cdot \frac{b}{a} + \frac{1}{2} \cdot \frac{c}{b}}{c}\right)}\right) \]
  8. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\left(\frac{-2}{3} \cdot \frac{b}{a} + \frac{1}{2} \cdot \frac{c}{b}\right), \color{blue}{c}\right)\right) \]
    2. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{-2}{3} \cdot \frac{b}{a}\right), \left(\frac{1}{2} \cdot \frac{c}{b}\right)\right), c\right)\right) \]
    3. associate-*r/N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{-2}{3} \cdot b}{a}\right), \left(\frac{1}{2} \cdot \frac{c}{b}\right)\right), c\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{-2}{3} \cdot b\right), a\right), \left(\frac{1}{2} \cdot \frac{c}{b}\right)\right), c\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \left(\frac{1}{2} \cdot \frac{c}{b}\right)\right), c\right)\right) \]
    6. associate-*r/N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \left(\frac{\frac{1}{2} \cdot c}{b}\right)\right), c\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot c\right), b\right)\right), c\right)\right) \]
    8. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \mathsf{/.f64}\left(\left(c \cdot \frac{1}{2}\right), b\right)\right), c\right)\right) \]
    9. *-lowering-*.f6494.3%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{1}{2}\right), b\right)\right), c\right)\right) \]
  9. Simplified94.3%

    \[\leadsto \frac{\frac{0.3333333333333333}{a}}{\color{blue}{\frac{\frac{-0.6666666666666666 \cdot b}{a} + \frac{c \cdot 0.5}{b}}{c}}} \]
  10. Step-by-step derivation
    1. div-invN/A

      \[\leadsto \frac{\frac{1}{3} \cdot \frac{1}{a}}{\frac{\color{blue}{\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}}}{c}} \]
    2. associate-/l*N/A

      \[\leadsto \frac{1}{3} \cdot \color{blue}{\frac{\frac{1}{a}}{\frac{\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}}{c}}} \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \color{blue}{\left(\frac{\frac{1}{a}}{\frac{\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}}{c}}\right)}\right) \]
    4. div-invN/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \left(\frac{1}{a} \cdot \color{blue}{\frac{1}{\frac{\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}}{c}}}\right)\right) \]
    5. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \left(\frac{1}{a} \cdot \frac{c}{\color{blue}{\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}}}\right)\right) \]
    6. frac-timesN/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \left(\frac{1 \cdot c}{\color{blue}{a \cdot \left(\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}\right)}}\right)\right) \]
    7. metadata-evalN/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \left(\frac{\left(\mathsf{neg}\left(-1\right)\right) \cdot c}{a \cdot \left(\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}\right)}\right)\right) \]
    8. distribute-lft-neg-inN/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \left(\frac{\mathsf{neg}\left(-1 \cdot c\right)}{\color{blue}{a} \cdot \left(\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}\right)}\right)\right) \]
    9. neg-mul-1N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \left(\frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(c\right)\right)\right)}{a \cdot \left(\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}\right)}\right)\right) \]
    10. remove-double-negN/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \left(\frac{c}{\color{blue}{a} \cdot \left(\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}\right)}\right)\right) \]
    11. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(c, \color{blue}{\left(a \cdot \left(\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}\right)\right)}\right)\right) \]
    12. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(a, \color{blue}{\left(\frac{\frac{-2}{3} \cdot b}{a} + \frac{c \cdot \frac{1}{2}}{b}\right)}\right)\right)\right) \]
    13. +-lowering-+.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\left(\frac{\frac{-2}{3} \cdot b}{a}\right), \color{blue}{\left(\frac{c \cdot \frac{1}{2}}{b}\right)}\right)\right)\right)\right) \]
    14. associate-/l*N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\left(\frac{-2}{3} \cdot \frac{b}{a}\right), \left(\frac{\color{blue}{c \cdot \frac{1}{2}}}{b}\right)\right)\right)\right)\right) \]
    15. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\left(\frac{-2}{3} \cdot \frac{1}{\frac{a}{b}}\right), \left(\frac{c \cdot \color{blue}{\frac{1}{2}}}{b}\right)\right)\right)\right)\right) \]
    16. un-div-invN/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\left(\frac{\frac{-2}{3}}{\frac{a}{b}}\right), \left(\frac{\color{blue}{c \cdot \frac{1}{2}}}{b}\right)\right)\right)\right)\right) \]
    17. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{-2}{3}, \left(\frac{a}{b}\right)\right), \left(\frac{\color{blue}{c \cdot \frac{1}{2}}}{b}\right)\right)\right)\right)\right) \]
    18. /-lowering-/.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{-2}{3}, \mathsf{/.f64}\left(a, b\right)\right), \left(\frac{c \cdot \color{blue}{\frac{1}{2}}}{b}\right)\right)\right)\right)\right) \]
    19. associate-/l*N/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{-2}{3}, \mathsf{/.f64}\left(a, b\right)\right), \left(c \cdot \color{blue}{\frac{\frac{1}{2}}{b}}\right)\right)\right)\right)\right) \]
    20. clear-numN/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{-2}{3}, \mathsf{/.f64}\left(a, b\right)\right), \left(c \cdot \frac{1}{\color{blue}{\frac{b}{\frac{1}{2}}}}\right)\right)\right)\right)\right) \]
    21. un-div-invN/A

      \[\leadsto \mathsf{*.f64}\left(\frac{1}{3}, \mathsf{/.f64}\left(c, \mathsf{*.f64}\left(a, \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{-2}{3}, \mathsf{/.f64}\left(a, b\right)\right), \left(\frac{c}{\color{blue}{\frac{b}{\frac{1}{2}}}}\right)\right)\right)\right)\right) \]
  11. Applied egg-rr94.2%

    \[\leadsto \color{blue}{0.3333333333333333 \cdot \frac{c}{a \cdot \left(\frac{-0.6666666666666666}{\frac{a}{b}} + \frac{c}{\frac{b}{0.5}}\right)}} \]
  12. Add Preprocessing

Alternative 9: 94.9% accurate, 7.7× speedup?

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

\\
\frac{\frac{0.3333333333333333}{a}}{\frac{0.5}{b} + -0.6666666666666666 \cdot \frac{b}{c \cdot a}}
\end{array}
Derivation
  1. Initial program 17.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. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), \color{blue}{\left(3 \cdot a\right)}\right) \]
    2. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    3. unsub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    6. sub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    10. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    16. *-lowering-*.f6417.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
  3. Simplified17.8%

    \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Step-by-step derivation
    1. remove-double-negN/A

      \[\leadsto \frac{\left(\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)\right) - b}{3 \cdot a} \]
    2. sub-divN/A

      \[\leadsto \frac{\mathsf{neg}\left(\left(\mathsf{neg}\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}\right)\right)\right)}{3 \cdot a} - \color{blue}{\frac{b}{3 \cdot a}} \]
    3. remove-double-negN/A

      \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)}}{3 \cdot a} - \frac{b}{3 \cdot a} \]
    4. div-subN/A

      \[\leadsto \frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{\color{blue}{3 \cdot a}} \]
    5. clear-numN/A

      \[\leadsto \frac{1}{\color{blue}{\frac{3 \cdot a}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}}} \]
    6. div-invN/A

      \[\leadsto \frac{1}{\left(3 \cdot a\right) \cdot \color{blue}{\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}}} \]
    7. associate-/r*N/A

      \[\leadsto \frac{\frac{1}{3 \cdot a}}{\color{blue}{\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}}} \]
    8. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{1}{3 \cdot a}\right), \color{blue}{\left(\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}\right)}\right) \]
    9. associate-/r*N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{\frac{1}{3}}{a}\right), \left(\frac{\color{blue}{1}}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}\right)\right) \]
    10. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\left(\frac{1}{3}\right), a\right), \left(\frac{\color{blue}{1}}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}\right)\right) \]
    11. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \left(\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}\right)\right) \]
    12. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(1, \color{blue}{\left(\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b\right)}\right)\right) \]
  6. Applied egg-rr17.8%

    \[\leadsto \color{blue}{\frac{\frac{0.3333333333333333}{a}}{\frac{1}{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}}} \]
  7. Taylor expanded in c around 0

    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \color{blue}{\left(\frac{\frac{-2}{3} \cdot \frac{b}{a} + \frac{1}{2} \cdot \frac{c}{b}}{c}\right)}\right) \]
  8. Step-by-step derivation
    1. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\left(\frac{-2}{3} \cdot \frac{b}{a} + \frac{1}{2} \cdot \frac{c}{b}\right), \color{blue}{c}\right)\right) \]
    2. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{-2}{3} \cdot \frac{b}{a}\right), \left(\frac{1}{2} \cdot \frac{c}{b}\right)\right), c\right)\right) \]
    3. associate-*r/N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\left(\frac{\frac{-2}{3} \cdot b}{a}\right), \left(\frac{1}{2} \cdot \frac{c}{b}\right)\right), c\right)\right) \]
    4. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\left(\frac{-2}{3} \cdot b\right), a\right), \left(\frac{1}{2} \cdot \frac{c}{b}\right)\right), c\right)\right) \]
    5. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \left(\frac{1}{2} \cdot \frac{c}{b}\right)\right), c\right)\right) \]
    6. associate-*r/N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \left(\frac{\frac{1}{2} \cdot c}{b}\right)\right), c\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \mathsf{/.f64}\left(\left(\frac{1}{2} \cdot c\right), b\right)\right), c\right)\right) \]
    8. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \mathsf{/.f64}\left(\left(c \cdot \frac{1}{2}\right), b\right)\right), c\right)\right) \]
    9. *-lowering-*.f6494.3%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{/.f64}\left(\mathsf{+.f64}\left(\mathsf{/.f64}\left(\mathsf{*.f64}\left(\frac{-2}{3}, b\right), a\right), \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{1}{2}\right), b\right)\right), c\right)\right) \]
  9. Simplified94.3%

    \[\leadsto \frac{\frac{0.3333333333333333}{a}}{\color{blue}{\frac{\frac{-0.6666666666666666 \cdot b}{a} + \frac{c \cdot 0.5}{b}}{c}}} \]
  10. Taylor expanded in a around inf

    \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \color{blue}{\left(\frac{-2}{3} \cdot \frac{b}{a \cdot c} + \frac{1}{2} \cdot \frac{1}{b}\right)}\right) \]
  11. Step-by-step derivation
    1. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \left(\frac{1}{2} \cdot \frac{1}{b} + \color{blue}{\frac{-2}{3} \cdot \frac{b}{a \cdot c}}\right)\right) \]
    2. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{+.f64}\left(\left(\frac{1}{2} \cdot \frac{1}{b}\right), \color{blue}{\left(\frac{-2}{3} \cdot \frac{b}{a \cdot c}\right)}\right)\right) \]
    3. associate-*r/N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{+.f64}\left(\left(\frac{\frac{1}{2} \cdot 1}{b}\right), \left(\color{blue}{\frac{-2}{3}} \cdot \frac{b}{a \cdot c}\right)\right)\right) \]
    4. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{+.f64}\left(\left(\frac{\frac{1}{2}}{b}\right), \left(\frac{-2}{3} \cdot \frac{b}{a \cdot c}\right)\right)\right) \]
    5. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, b\right), \left(\color{blue}{\frac{-2}{3}} \cdot \frac{b}{a \cdot c}\right)\right)\right) \]
    6. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, b\right), \mathsf{*.f64}\left(\frac{-2}{3}, \color{blue}{\left(\frac{b}{a \cdot c}\right)}\right)\right)\right) \]
    7. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, b\right), \mathsf{*.f64}\left(\frac{-2}{3}, \mathsf{/.f64}\left(b, \color{blue}{\left(a \cdot c\right)}\right)\right)\right)\right) \]
    8. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, b\right), \mathsf{*.f64}\left(\frac{-2}{3}, \mathsf{/.f64}\left(b, \left(c \cdot \color{blue}{a}\right)\right)\right)\right)\right) \]
    9. *-lowering-*.f6494.2%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{/.f64}\left(\frac{1}{3}, a\right), \mathsf{+.f64}\left(\mathsf{/.f64}\left(\frac{1}{2}, b\right), \mathsf{*.f64}\left(\frac{-2}{3}, \mathsf{/.f64}\left(b, \mathsf{*.f64}\left(c, \color{blue}{a}\right)\right)\right)\right)\right) \]
  12. Simplified94.2%

    \[\leadsto \frac{\frac{0.3333333333333333}{a}}{\color{blue}{\frac{0.5}{b} + -0.6666666666666666 \cdot \frac{b}{c \cdot a}}} \]
  13. Add Preprocessing

Alternative 10: 90.8% accurate, 23.2× speedup?

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

\\
\frac{c \cdot -0.5}{b}
\end{array}
Derivation
  1. Initial program 17.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. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), \color{blue}{\left(3 \cdot a\right)}\right) \]
    2. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    3. unsub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    6. sub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    10. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    16. *-lowering-*.f6417.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
  3. Simplified17.8%

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

    \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
  6. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{\frac{-1}{2} \cdot c}{\color{blue}{b}} \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot c\right), \color{blue}{b}\right) \]
    3. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(c \cdot \frac{-1}{2}\right), b\right) \]
    4. *-lowering-*.f6490.2%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right) \]
  7. Simplified90.2%

    \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b}} \]
  8. Add Preprocessing

Alternative 11: 90.5% accurate, 23.2× speedup?

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

\\
c \cdot \frac{-0.5}{b}
\end{array}
Derivation
  1. Initial program 17.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. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), \color{blue}{\left(3 \cdot a\right)}\right) \]
    2. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    3. unsub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    6. sub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    10. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    16. *-lowering-*.f6417.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
  3. Simplified17.8%

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

    \[\leadsto \color{blue}{\frac{-1}{2} \cdot \frac{c}{b}} \]
  6. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{\frac{-1}{2} \cdot c}{\color{blue}{b}} \]
    2. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\frac{-1}{2} \cdot c\right), \color{blue}{b}\right) \]
    3. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(c \cdot \frac{-1}{2}\right), b\right) \]
    4. *-lowering-*.f6490.2%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{*.f64}\left(c, \frac{-1}{2}\right), b\right) \]
  7. Simplified90.2%

    \[\leadsto \color{blue}{\frac{c \cdot -0.5}{b}} \]
  8. Step-by-step derivation
    1. associate-/l*N/A

      \[\leadsto c \cdot \color{blue}{\frac{\frac{-1}{2}}{b}} \]
    2. *-commutativeN/A

      \[\leadsto \frac{\frac{-1}{2}}{b} \cdot \color{blue}{c} \]
    3. *-lowering-*.f64N/A

      \[\leadsto \mathsf{*.f64}\left(\left(\frac{\frac{-1}{2}}{b}\right), \color{blue}{c}\right) \]
    4. /-lowering-/.f6489.9%

      \[\leadsto \mathsf{*.f64}\left(\mathsf{/.f64}\left(\frac{-1}{2}, b\right), c\right) \]
  9. Applied egg-rr89.9%

    \[\leadsto \color{blue}{\frac{-0.5}{b} \cdot c} \]
  10. Final simplification89.9%

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

Alternative 12: 3.3% accurate, 116.0× speedup?

\[\begin{array}{l} \\ 0 \end{array} \]
(FPCore (a b c) :precision binary64 0.0)
double code(double a, double b, double c) {
	return 0.0;
}
real(8) function code(a, b, c)
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = 0.0d0
end function
public static double code(double a, double b, double c) {
	return 0.0;
}
def code(a, b, c):
	return 0.0
function code(a, b, c)
	return 0.0
end
function tmp = code(a, b, c)
	tmp = 0.0;
end
code[a_, b_, c_] := 0.0
\begin{array}{l}

\\
0
\end{array}
Derivation
  1. Initial program 17.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. /-lowering-/.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\left(\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), \color{blue}{\left(3 \cdot a\right)}\right) \]
    2. +-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} + \left(\mathsf{neg}\left(b\right)\right)\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    3. unsub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} - b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    4. --lowering--.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\left(\sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right), b\right), \left(\color{blue}{3} \cdot a\right)\right) \]
    5. sqrt-lowering-sqrt.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b - \left(3 \cdot a\right) \cdot c\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    6. sub-negN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\left(b \cdot b + \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    7. +-lowering-+.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\left(b \cdot b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    8. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(\left(3 \cdot a\right) \cdot c\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    9. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(\mathsf{neg}\left(c \cdot \left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    10. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \left(c \cdot \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    11. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(3 \cdot a\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    12. *-commutativeN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(\mathsf{neg}\left(a \cdot 3\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    13. distribute-rgt-neg-inN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \left(a \cdot \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    14. *-lowering-*.f64N/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, \left(\mathsf{neg}\left(3\right)\right)\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    15. metadata-evalN/A

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \left(3 \cdot a\right)\right) \]
    16. *-lowering-*.f6417.8%

      \[\leadsto \mathsf{/.f64}\left(\mathsf{\_.f64}\left(\mathsf{sqrt.f64}\left(\mathsf{+.f64}\left(\mathsf{*.f64}\left(b, b\right), \mathsf{*.f64}\left(c, \mathsf{*.f64}\left(a, -3\right)\right)\right)\right), b\right), \mathsf{*.f64}\left(3, \color{blue}{a}\right)\right) \]
  3. Simplified17.8%

    \[\leadsto \color{blue}{\frac{\sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} - b}{3 \cdot a}} \]
  4. Add Preprocessing
  5. Applied egg-rr19.0%

    \[\leadsto \color{blue}{\frac{\frac{b}{\frac{0.3333333333333333}{a}} + \sqrt{b \cdot b + c \cdot \left(a \cdot -3\right)} \cdot \left(a \cdot -3\right)}{a \cdot \left(a \cdot -9\right)}} \]
  6. Taylor expanded in a around 0

    \[\leadsto \color{blue}{\frac{-1}{9} \cdot \frac{-3 \cdot b + 3 \cdot b}{a}} \]
  7. Step-by-step derivation
    1. associate-*r/N/A

      \[\leadsto \frac{\frac{-1}{9} \cdot \left(-3 \cdot b + 3 \cdot b\right)}{\color{blue}{a}} \]
    2. distribute-rgt-outN/A

      \[\leadsto \frac{\frac{-1}{9} \cdot \left(b \cdot \left(-3 + 3\right)\right)}{a} \]
    3. metadata-evalN/A

      \[\leadsto \frac{\frac{-1}{9} \cdot \left(b \cdot 0\right)}{a} \]
    4. mul0-rgtN/A

      \[\leadsto \frac{\frac{-1}{9} \cdot 0}{a} \]
    5. metadata-evalN/A

      \[\leadsto \frac{0}{a} \]
    6. /-lowering-/.f643.3%

      \[\leadsto \mathsf{/.f64}\left(0, \color{blue}{a}\right) \]
  8. Simplified3.3%

    \[\leadsto \color{blue}{\frac{0}{a}} \]
  9. Step-by-step derivation
    1. div03.3%

      \[\leadsto 0 \]
  10. Applied egg-rr3.3%

    \[\leadsto \color{blue}{0} \]
  11. Add Preprocessing

Reproduce

?
herbie shell --seed 2024159 
(FPCore (a b c)
  :name "Cubic critical, wide range"
  :precision binary64
  :pre (and (and (and (< 4.930380657631324e-32 a) (< a 2.028240960365167e+31)) (and (< 4.930380657631324e-32 b) (< b 2.028240960365167e+31))) (and (< 4.930380657631324e-32 c) (< c 2.028240960365167e+31)))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))