Cubic critical, narrow range

Percentage Accurate: 54.6% → 99.1%
Time: 8.8s
Alternatives: 8
Speedup: N/A×

Specification

?
\[\left(\left(1.0536712127723509 \cdot 10^{-8} < a \land a < 94906265.62425156\right) \land \left(1.0536712127723509 \cdot 10^{-8} < b \land b < 94906265.62425156\right)\right) \land \left(1.0536712127723509 \cdot 10^{-8} < c \land c < 94906265.62425156\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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\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 8 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: 54.6% 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);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-b + sqrt(((b * b) - ((3.0d0 * a) * c)))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-b + Math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
}
def code(a, b, c):
	return (-b + math.sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-b) + sqrt(Float64(Float64(b * b) - Float64(Float64(3.0 * a) * c)))) / Float64(3.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-b + sqrt(((b * b) - ((3.0 * a) * c)))) / (3.0 * a);
end
code[a_, b_, c_] := N[(N[((-b) + N[Sqrt[N[(N[(b * b), $MachinePrecision] - N[(N[(3.0 * a), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision]], $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\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: 99.1% accurate, N/A× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := -3 \cdot \left(c \cdot a\right)\\ \frac{\frac{-3 \cdot \left(a \cdot c\right)}{b + {\left(\frac{{\left(b \cdot b\right)}^{3} + {t\_0}^{3}}{\left(b \cdot b\right) \cdot \left(b \cdot b\right) + \left(t\_0 \cdot t\_0 - \left(b \cdot b\right) \cdot t\_0\right)}\right)}^{0.5}}}{3 \cdot a} \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (* -3.0 (* c a))))
   (/
    (/
     (- (* 3.0 (* a c)))
     (+
      b
      (pow
       (/
        (+ (pow (* b b) 3.0) (pow t_0 3.0))
        (+ (* (* b b) (* b b)) (- (* t_0 t_0) (* (* b b) t_0))))
       0.5)))
    (* 3.0 a))))
double code(double a, double b, double c) {
	double t_0 = -3.0 * (c * a);
	return (-(3.0 * (a * c)) / (b + pow(((pow((b * b), 3.0) + pow(t_0, 3.0)) / (((b * b) * (b * b)) + ((t_0 * t_0) - ((b * b) * t_0)))), 0.5))) / (3.0 * a);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    real(8) :: t_0
    t_0 = (-3.0d0) * (c * a)
    code = (-(3.0d0 * (a * c)) / (b + (((((b * b) ** 3.0d0) + (t_0 ** 3.0d0)) / (((b * b) * (b * b)) + ((t_0 * t_0) - ((b * b) * t_0)))) ** 0.5d0))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
	double t_0 = -3.0 * (c * a);
	return (-(3.0 * (a * c)) / (b + Math.pow(((Math.pow((b * b), 3.0) + Math.pow(t_0, 3.0)) / (((b * b) * (b * b)) + ((t_0 * t_0) - ((b * b) * t_0)))), 0.5))) / (3.0 * a);
}
def code(a, b, c):
	t_0 = -3.0 * (c * a)
	return (-(3.0 * (a * c)) / (b + math.pow(((math.pow((b * b), 3.0) + math.pow(t_0, 3.0)) / (((b * b) * (b * b)) + ((t_0 * t_0) - ((b * b) * t_0)))), 0.5))) / (3.0 * a)
function code(a, b, c)
	t_0 = Float64(-3.0 * Float64(c * a))
	return Float64(Float64(Float64(-Float64(3.0 * Float64(a * c))) / Float64(b + (Float64(Float64((Float64(b * b) ^ 3.0) + (t_0 ^ 3.0)) / Float64(Float64(Float64(b * b) * Float64(b * b)) + Float64(Float64(t_0 * t_0) - Float64(Float64(b * b) * t_0)))) ^ 0.5))) / Float64(3.0 * a))
end
function tmp = code(a, b, c)
	t_0 = -3.0 * (c * a);
	tmp = (-(3.0 * (a * c)) / (b + (((((b * b) ^ 3.0) + (t_0 ^ 3.0)) / (((b * b) * (b * b)) + ((t_0 * t_0) - ((b * b) * t_0)))) ^ 0.5))) / (3.0 * a);
end
code[a_, b_, c_] := Block[{t$95$0 = N[(-3.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]}, N[(N[((-N[(3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]) / N[(b + N[Power[N[(N[(N[Power[N[(b * b), $MachinePrecision], 3.0], $MachinePrecision] + N[Power[t$95$0, 3.0], $MachinePrecision]), $MachinePrecision] / N[(N[(N[(b * b), $MachinePrecision] * N[(b * b), $MachinePrecision]), $MachinePrecision] + N[(N[(t$95$0 * t$95$0), $MachinePrecision] - N[(N[(b * b), $MachinePrecision] * t$95$0), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := -3 \cdot \left(c \cdot a\right)\\
\frac{\frac{-3 \cdot \left(a \cdot c\right)}{b + {\left(\frac{{\left(b \cdot b\right)}^{3} + {t\_0}^{3}}{\left(b \cdot b\right) \cdot \left(b \cdot b\right) + \left(t\_0 \cdot t\_0 - \left(b \cdot b\right) \cdot t\_0\right)}\right)}^{0.5}}}{3 \cdot a}
\end{array}
\end{array}
Derivation
  1. Initial program 52.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-neg.f64N/A

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

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

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

      \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{\color{blue}{b \cdot b - \left(3 \cdot a\right) \cdot c}}}{3 \cdot a} \]
    5. lift-*.f64N/A

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

      \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \color{blue}{\left(3 \cdot a\right) \cdot c}}}{3 \cdot a} \]
    7. lift-*.f64N/A

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

      \[\leadsto \frac{\color{blue}{\frac{\left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}{3 \cdot a} \]
    9. lower-/.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{\left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}{3 \cdot a} \]
  4. Applied rewrites51.8%

    \[\leadsto \frac{\color{blue}{\frac{b \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5} \cdot {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}}}{3 \cdot a} \]
  5. Taylor expanded in a around 0

    \[\leadsto \frac{\frac{\color{blue}{3 \cdot \left(a \cdot c\right)}}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{\frac{1}{2}}}}{3 \cdot a} \]
  6. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto \frac{\frac{3 \cdot \color{blue}{\left(a \cdot c\right)}}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{\frac{1}{2}}}}{3 \cdot a} \]
    2. lift-*.f6499.1

      \[\leadsto \frac{\frac{3 \cdot \left(a \cdot \color{blue}{c}\right)}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}}{3 \cdot a} \]
  7. Applied rewrites99.1%

    \[\leadsto \frac{\frac{\color{blue}{3 \cdot \left(a \cdot c\right)}}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}}{3 \cdot a} \]
  8. Step-by-step derivation
    1. lift-pow.f64N/A

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

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

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

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

      \[\leadsto \frac{\frac{3 \cdot \left(a \cdot c\right)}{-1 \cdot b - {\left({b}^{\color{blue}{2}} + -3 \cdot \left(c \cdot a\right)\right)}^{\frac{1}{2}}}}{3 \cdot a} \]
    6. flip3-+N/A

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

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

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

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

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

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

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

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

    \[\leadsto \frac{\frac{3 \cdot \left(a \cdot c\right)}{-1 \cdot b - {\color{blue}{\left(\frac{{\left(b \cdot b\right)}^{3} + {\left(-3 \cdot \left(c \cdot a\right)\right)}^{3}}{\left(b \cdot b\right) \cdot \left(b \cdot b\right) + \left(\left(-3 \cdot \left(c \cdot a\right)\right) \cdot \left(-3 \cdot \left(c \cdot a\right)\right) - \left(b \cdot b\right) \cdot \left(-3 \cdot \left(c \cdot a\right)\right)\right)}\right)}}^{0.5}}}{3 \cdot a} \]
  10. Final simplification99.1%

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

Alternative 2: 99.1% accurate, N/A× speedup?

\[\begin{array}{l} \\ \frac{\frac{-3 \cdot \left(a \cdot c\right)}{b + {\left(b \cdot b + -3 \cdot \left(c \cdot a\right)\right)}^{0.5}}}{3 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/
  (/ (- (* 3.0 (* a c))) (+ b (pow (+ (* b b) (* -3.0 (* c a))) 0.5)))
  (* 3.0 a)))
double code(double a, double b, double c) {
	return (-(3.0 * (a * c)) / (b + pow(((b * b) + (-3.0 * (c * a))), 0.5))) / (3.0 * a);
}
module fmin_fmax_functions
    implicit none
    private
    public fmax
    public fmin

    interface fmax
        module procedure fmax88
        module procedure fmax44
        module procedure fmax84
        module procedure fmax48
    end interface
    interface fmin
        module procedure fmin88
        module procedure fmin44
        module procedure fmin84
        module procedure fmin48
    end interface
contains
    real(8) function fmax88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(4) function fmax44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, max(x, y), y /= y), x /= x)
    end function
    real(8) function fmax84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, max(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmax48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), max(dble(x), y), y /= y), x /= x)
    end function
    real(8) function fmin88(x, y) result (res)
        real(8), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(4) function fmin44(x, y) result (res)
        real(4), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(y, merge(x, min(x, y), y /= y), x /= x)
    end function
    real(8) function fmin84(x, y) result(res)
        real(8), intent (in) :: x
        real(4), intent (in) :: y
        res = merge(dble(y), merge(x, min(x, dble(y)), y /= y), x /= x)
    end function
    real(8) function fmin48(x, y) result(res)
        real(4), intent (in) :: x
        real(8), intent (in) :: y
        res = merge(y, merge(dble(x), min(dble(x), y), y /= y), x /= x)
    end function
end module

real(8) function code(a, b, c)
use fmin_fmax_functions
    real(8), intent (in) :: a
    real(8), intent (in) :: b
    real(8), intent (in) :: c
    code = (-(3.0d0 * (a * c)) / (b + (((b * b) + ((-3.0d0) * (c * a))) ** 0.5d0))) / (3.0d0 * a)
end function
public static double code(double a, double b, double c) {
	return (-(3.0 * (a * c)) / (b + Math.pow(((b * b) + (-3.0 * (c * a))), 0.5))) / (3.0 * a);
}
def code(a, b, c):
	return (-(3.0 * (a * c)) / (b + math.pow(((b * b) + (-3.0 * (c * a))), 0.5))) / (3.0 * a)
function code(a, b, c)
	return Float64(Float64(Float64(-Float64(3.0 * Float64(a * c))) / Float64(b + (Float64(Float64(b * b) + Float64(-3.0 * Float64(c * a))) ^ 0.5))) / Float64(3.0 * a))
end
function tmp = code(a, b, c)
	tmp = (-(3.0 * (a * c)) / (b + (((b * b) + (-3.0 * (c * a))) ^ 0.5))) / (3.0 * a);
end
code[a_, b_, c_] := N[(N[((-N[(3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]) / N[(b + N[Power[N[(N[(b * b), $MachinePrecision] + N[(-3.0 * N[(c * a), $MachinePrecision]), $MachinePrecision]), $MachinePrecision], 0.5], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{-3 \cdot \left(a \cdot c\right)}{b + {\left(b \cdot b + -3 \cdot \left(c \cdot a\right)\right)}^{0.5}}}{3 \cdot a}
\end{array}
Derivation
  1. Initial program 52.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-neg.f64N/A

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

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

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

      \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{\color{blue}{b \cdot b - \left(3 \cdot a\right) \cdot c}}}{3 \cdot a} \]
    5. lift-*.f64N/A

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

      \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \color{blue}{\left(3 \cdot a\right) \cdot c}}}{3 \cdot a} \]
    7. lift-*.f64N/A

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

      \[\leadsto \frac{\color{blue}{\frac{\left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}{3 \cdot a} \]
    9. lower-/.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{\left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}{3 \cdot a} \]
  4. Applied rewrites51.8%

    \[\leadsto \frac{\color{blue}{\frac{b \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5} \cdot {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}}}{3 \cdot a} \]
  5. Taylor expanded in a around 0

    \[\leadsto \frac{\frac{\color{blue}{3 \cdot \left(a \cdot c\right)}}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{\frac{1}{2}}}}{3 \cdot a} \]
  6. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto \frac{\frac{3 \cdot \color{blue}{\left(a \cdot c\right)}}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{\frac{1}{2}}}}{3 \cdot a} \]
    2. lift-*.f6499.1

      \[\leadsto \frac{\frac{3 \cdot \left(a \cdot \color{blue}{c}\right)}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}}{3 \cdot a} \]
  7. Applied rewrites99.1%

    \[\leadsto \frac{\frac{\color{blue}{3 \cdot \left(a \cdot c\right)}}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}}{3 \cdot a} \]
  8. Step-by-step derivation
    1. lift-pow.f64N/A

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

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

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

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

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

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

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

      \[\leadsto \frac{\frac{3 \cdot \left(a \cdot c\right)}{-1 \cdot b - {\left(\color{blue}{b \cdot b} + -3 \cdot \left(c \cdot a\right)\right)}^{0.5}}}{3 \cdot a} \]
  9. Applied rewrites99.1%

    \[\leadsto \frac{\frac{3 \cdot \left(a \cdot c\right)}{-1 \cdot b - {\color{blue}{\left(b \cdot b + -3 \cdot \left(c \cdot a\right)\right)}}^{0.5}}}{3 \cdot a} \]
  10. Final simplification99.1%

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

Alternative 3: 91.2% accurate, N/A× speedup?

\[\begin{array}{l} \\ \frac{\frac{-3 \cdot \left(a \cdot c\right)}{b + \left(b + c \cdot \mathsf{fma}\left(-1.5, \frac{a}{b}, c \cdot \mathsf{fma}\left(-1.6875, \frac{{a}^{3} \cdot c}{{b}^{5}}, -1.125 \cdot \frac{a \cdot a}{{b}^{3}}\right)\right)\right)}}{3 \cdot a} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (/
  (/
   (- (* 3.0 (* a c)))
   (+
    b
    (+
     b
     (*
      c
      (fma
       -1.5
       (/ a b)
       (*
        c
        (fma
         -1.6875
         (/ (* (pow a 3.0) c) (pow b 5.0))
         (* -1.125 (/ (* a a) (pow b 3.0))))))))))
  (* 3.0 a)))
double code(double a, double b, double c) {
	return (-(3.0 * (a * c)) / (b + (b + (c * fma(-1.5, (a / b), (c * fma(-1.6875, ((pow(a, 3.0) * c) / pow(b, 5.0)), (-1.125 * ((a * a) / pow(b, 3.0)))))))))) / (3.0 * a);
}
function code(a, b, c)
	return Float64(Float64(Float64(-Float64(3.0 * Float64(a * c))) / Float64(b + Float64(b + Float64(c * fma(-1.5, Float64(a / b), Float64(c * fma(-1.6875, Float64(Float64((a ^ 3.0) * c) / (b ^ 5.0)), Float64(-1.125 * Float64(Float64(a * a) / (b ^ 3.0)))))))))) / Float64(3.0 * a))
end
code[a_, b_, c_] := N[(N[((-N[(3.0 * N[(a * c), $MachinePrecision]), $MachinePrecision]) / N[(b + N[(b + N[(c * N[(-1.5 * N[(a / b), $MachinePrecision] + N[(c * N[(-1.6875 * N[(N[(N[Power[a, 3.0], $MachinePrecision] * c), $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision] + N[(-1.125 * N[(N[(a * a), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(3.0 * a), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\frac{\frac{-3 \cdot \left(a \cdot c\right)}{b + \left(b + c \cdot \mathsf{fma}\left(-1.5, \frac{a}{b}, c \cdot \mathsf{fma}\left(-1.6875, \frac{{a}^{3} \cdot c}{{b}^{5}}, -1.125 \cdot \frac{a \cdot a}{{b}^{3}}\right)\right)\right)}}{3 \cdot a}
\end{array}
Derivation
  1. Initial program 52.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Add Preprocessing
  3. Step-by-step derivation
    1. lift-neg.f64N/A

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

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

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

      \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{\color{blue}{b \cdot b - \left(3 \cdot a\right) \cdot c}}}{3 \cdot a} \]
    5. lift-*.f64N/A

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

      \[\leadsto \frac{\left(\mathsf{neg}\left(b\right)\right) + \sqrt{b \cdot b - \color{blue}{\left(3 \cdot a\right) \cdot c}}}{3 \cdot a} \]
    7. lift-*.f64N/A

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

      \[\leadsto \frac{\color{blue}{\frac{\left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}{3 \cdot a} \]
    9. lower-/.f64N/A

      \[\leadsto \frac{\color{blue}{\frac{\left(\mathsf{neg}\left(b\right)\right) \cdot \left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c} \cdot \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{\left(\mathsf{neg}\left(b\right)\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}{3 \cdot a} \]
  4. Applied rewrites51.8%

    \[\leadsto \frac{\color{blue}{\frac{b \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5} \cdot {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}}}{3 \cdot a} \]
  5. Taylor expanded in a around 0

    \[\leadsto \frac{\frac{\color{blue}{3 \cdot \left(a \cdot c\right)}}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{\frac{1}{2}}}}{3 \cdot a} \]
  6. Step-by-step derivation
    1. lower-*.f64N/A

      \[\leadsto \frac{\frac{3 \cdot \color{blue}{\left(a \cdot c\right)}}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{\frac{1}{2}}}}{3 \cdot a} \]
    2. lift-*.f6499.1

      \[\leadsto \frac{\frac{3 \cdot \left(a \cdot \color{blue}{c}\right)}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}}{3 \cdot a} \]
  7. Applied rewrites99.1%

    \[\leadsto \frac{\frac{\color{blue}{3 \cdot \left(a \cdot c\right)}}{-1 \cdot b - {\left(\mathsf{fma}\left({b}^{1}, {b}^{1}, -3 \cdot \left(c \cdot a\right)\right)\right)}^{0.5}}}{3 \cdot a} \]
  8. Taylor expanded in c around 0

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

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

      \[\leadsto \frac{\frac{3 \cdot \left(a \cdot c\right)}{-1 \cdot b - \left(b + c \cdot \left(\frac{-3}{2} \cdot \frac{a}{b} + c \cdot \left(\frac{-27}{16} \cdot \frac{{a}^{3} \cdot c}{{b}^{5}} + \frac{-9}{8} \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right)\right)}}{3 \cdot a} \]
    3. lift-fma.f64N/A

      \[\leadsto \frac{\frac{3 \cdot \left(a \cdot c\right)}{-1 \cdot b - \left(b + c \cdot \left(\frac{-3}{2} \cdot \frac{a}{b} + c \cdot \left(\frac{-27}{16} \cdot \frac{{a}^{3} \cdot c}{{b}^{5}} + \frac{-9}{8} \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right)\right)}}{3 \cdot a} \]
    4. unpow1N/A

      \[\leadsto \frac{\frac{3 \cdot \left(a \cdot c\right)}{-1 \cdot b - \left(b + c \cdot \left(\frac{-3}{2} \cdot \frac{a}{b} + c \cdot \left(\frac{-27}{16} \cdot \frac{{a}^{3} \cdot c}{{b}^{5}} + \frac{-9}{8} \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right)\right)}}{3 \cdot a} \]
    5. unpow1N/A

      \[\leadsto \frac{\frac{3 \cdot \left(a \cdot c\right)}{-1 \cdot b - \left(b + c \cdot \left(\frac{-3}{2} \cdot \frac{a}{b} + c \cdot \left(\frac{-27}{16} \cdot \frac{{a}^{3} \cdot c}{{b}^{5}} + \frac{-9}{8} \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right)\right)}}{3 \cdot a} \]
    6. lift-fma.f64N/A

      \[\leadsto \frac{\frac{3 \cdot \left(a \cdot c\right)}{-1 \cdot b - \left(b + c \cdot \left(\frac{-3}{2} \cdot \frac{a}{b} + c \cdot \left(\frac{-27}{16} \cdot \frac{{a}^{3} \cdot c}{{b}^{5}} + \frac{-9}{8} \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right)\right)}}{3 \cdot a} \]
    7. lift-*.f64N/A

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

      \[\leadsto \frac{\frac{3 \cdot \left(a \cdot c\right)}{-1 \cdot b - \left(b + c \cdot \left(\frac{-3}{2} \cdot \frac{a}{b} + c \cdot \left(\frac{-27}{16} \cdot \frac{{a}^{3} \cdot c}{{b}^{5}} + \frac{-9}{8} \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right)\right)}}{3 \cdot a} \]
    9. lower-+.f64N/A

      \[\leadsto \frac{\frac{3 \cdot \left(a \cdot c\right)}{-1 \cdot b - \left(b + \color{blue}{c \cdot \left(\frac{-3}{2} \cdot \frac{a}{b} + c \cdot \left(\frac{-27}{16} \cdot \frac{{a}^{3} \cdot c}{{b}^{5}} + \frac{-9}{8} \cdot \frac{{a}^{2}}{{b}^{3}}\right)\right)}\right)}}{3 \cdot a} \]
  10. Applied rewrites92.5%

    \[\leadsto \frac{\frac{3 \cdot \left(a \cdot c\right)}{-1 \cdot b - \color{blue}{\left(b + c \cdot \mathsf{fma}\left(-1.5, \frac{a}{b}, c \cdot \mathsf{fma}\left(-1.6875, \frac{{a}^{3} \cdot c}{{b}^{5}}, -1.125 \cdot \frac{a \cdot a}{{b}^{3}}\right)\right)\right)}}}{3 \cdot a} \]
  11. Final simplification92.5%

    \[\leadsto \frac{\frac{-3 \cdot \left(a \cdot c\right)}{b + \left(b + c \cdot \mathsf{fma}\left(-1.5, \frac{a}{b}, c \cdot \mathsf{fma}\left(-1.6875, \frac{{a}^{3} \cdot c}{{b}^{5}}, -1.125 \cdot \frac{a \cdot a}{{b}^{3}}\right)\right)\right)}}{3 \cdot a} \]
  12. Add Preprocessing

Alternative 4: 91.2% accurate, N/A× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a \cdot \frac{\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125}{b}, -0.16666666666666666, \frac{-0.5625 \cdot \left(\left(c \cdot c\right) \cdot c\right)}{{b}^{5}}\right), a, \frac{-0.375 \cdot \left(c \cdot c\right)}{{b}^{3}}\right), a, \frac{c}{b} \cdot -0.5\right) \end{array} \]
(FPCore (a b c)
 :precision binary64
 (fma
  (fma
   (fma
    (* a (/ (* (/ (pow c 4.0) (pow b 6.0)) 6.328125) b))
    -0.16666666666666666
    (/ (* -0.5625 (* (* c c) c)) (pow b 5.0)))
   a
   (/ (* -0.375 (* c c)) (pow b 3.0)))
  a
  (* (/ c b) -0.5)))
double code(double a, double b, double c) {
	return fma(fma(fma((a * (((pow(c, 4.0) / pow(b, 6.0)) * 6.328125) / b)), -0.16666666666666666, ((-0.5625 * ((c * c) * c)) / pow(b, 5.0))), a, ((-0.375 * (c * c)) / pow(b, 3.0))), a, ((c / b) * -0.5));
}
function code(a, b, c)
	return fma(fma(fma(Float64(a * Float64(Float64(Float64((c ^ 4.0) / (b ^ 6.0)) * 6.328125) / b)), -0.16666666666666666, Float64(Float64(-0.5625 * Float64(Float64(c * c) * c)) / (b ^ 5.0))), a, Float64(Float64(-0.375 * Float64(c * c)) / (b ^ 3.0))), a, Float64(Float64(c / b) * -0.5))
end
code[a_, b_, c_] := N[(N[(N[(N[(a * N[(N[(N[(N[Power[c, 4.0], $MachinePrecision] / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision] * 6.328125), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666 + N[(N[(-0.5625 * N[(N[(c * c), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a + N[(N[(-0.375 * N[(c * c), $MachinePrecision]), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * a + N[(N[(c / b), $MachinePrecision] * -0.5), $MachinePrecision]), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(a \cdot \frac{\frac{{c}^{4}}{{b}^{6}} \cdot 6.328125}{b}, -0.16666666666666666, \frac{-0.5625 \cdot \left(\left(c \cdot c\right) \cdot c\right)}{{b}^{5}}\right), a, \frac{-0.375 \cdot \left(c \cdot c\right)}{{b}^{3}}\right), a, \frac{c}{b} \cdot -0.5\right)
\end{array}
Derivation
  1. Initial program 52.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Add Preprocessing
  3. 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)} \]
  4. Applied rewrites92.5%

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

Alternative 5: 91.2% accurate, N/A× speedup?

\[\begin{array}{l} \\ \begin{array}{l} t_0 := {\left(a \cdot c\right)}^{4}\\ \frac{-0.5625 \cdot \frac{\left(a \cdot a\right) \cdot \left(\left(c \cdot c\right) \cdot c\right)}{{b}^{4}} + \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-0.375, \frac{a \cdot \left(c \cdot c\right)}{b \cdot b}, -0.16666666666666666 \cdot \frac{\mathsf{fma}\left(1.265625, t\_0, 5.0625 \cdot t\_0\right)}{a \cdot {b}^{6}}\right)\right)}{b} \end{array} \end{array} \]
(FPCore (a b c)
 :precision binary64
 (let* ((t_0 (pow (* a c) 4.0)))
   (/
    (+
     (* -0.5625 (/ (* (* a a) (* (* c c) c)) (pow b 4.0)))
     (fma
      -0.5
      c
      (fma
       -0.375
       (/ (* a (* c c)) (* b b))
       (*
        -0.16666666666666666
        (/ (fma 1.265625 t_0 (* 5.0625 t_0)) (* a (pow b 6.0)))))))
    b)))
double code(double a, double b, double c) {
	double t_0 = pow((a * c), 4.0);
	return ((-0.5625 * (((a * a) * ((c * c) * c)) / pow(b, 4.0))) + fma(-0.5, c, fma(-0.375, ((a * (c * c)) / (b * b)), (-0.16666666666666666 * (fma(1.265625, t_0, (5.0625 * t_0)) / (a * pow(b, 6.0))))))) / b;
}
function code(a, b, c)
	t_0 = Float64(a * c) ^ 4.0
	return Float64(Float64(Float64(-0.5625 * Float64(Float64(Float64(a * a) * Float64(Float64(c * c) * c)) / (b ^ 4.0))) + fma(-0.5, c, fma(-0.375, Float64(Float64(a * Float64(c * c)) / Float64(b * b)), Float64(-0.16666666666666666 * Float64(fma(1.265625, t_0, Float64(5.0625 * t_0)) / Float64(a * (b ^ 6.0))))))) / b)
end
code[a_, b_, c_] := Block[{t$95$0 = N[Power[N[(a * c), $MachinePrecision], 4.0], $MachinePrecision]}, N[(N[(N[(-0.5625 * N[(N[(N[(a * a), $MachinePrecision] * N[(N[(c * c), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] + N[(-0.5 * c + N[(-0.375 * N[(N[(a * N[(c * c), $MachinePrecision]), $MachinePrecision] / N[(b * b), $MachinePrecision]), $MachinePrecision] + N[(-0.16666666666666666 * N[(N[(1.265625 * t$95$0 + N[(5.0625 * t$95$0), $MachinePrecision]), $MachinePrecision] / N[(a * N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / b), $MachinePrecision]]
\begin{array}{l}

\\
\begin{array}{l}
t_0 := {\left(a \cdot c\right)}^{4}\\
\frac{-0.5625 \cdot \frac{\left(a \cdot a\right) \cdot \left(\left(c \cdot c\right) \cdot c\right)}{{b}^{4}} + \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-0.375, \frac{a \cdot \left(c \cdot c\right)}{b \cdot b}, -0.16666666666666666 \cdot \frac{\mathsf{fma}\left(1.265625, t\_0, 5.0625 \cdot t\_0\right)}{a \cdot {b}^{6}}\right)\right)}{b}
\end{array}
\end{array}
Derivation
  1. Initial program 52.0%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Add Preprocessing
  3. 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)} \]
  4. Applied rewrites92.5%

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

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

    \[\leadsto \color{blue}{\frac{-0.5625 \cdot \frac{\left(a \cdot a\right) \cdot \left(\left(c \cdot c\right) \cdot c\right)}{{b}^{4}} + \mathsf{fma}\left(-0.5, c, \mathsf{fma}\left(-0.375, \frac{a \cdot \left(c \cdot c\right)}{b \cdot b}, -0.16666666666666666 \cdot \frac{\mathsf{fma}\left(1.265625, {\left(a \cdot c\right)}^{4}, 5.0625 \cdot {\left(a \cdot c\right)}^{4}\right)}{a \cdot {b}^{6}}\right)\right)}{b}} \]
  7. Add Preprocessing

Alternative 6: 91.0% accurate, N/A× speedup?

\[\begin{array}{l} \\ \mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{c}{a} \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{b}, -0.16666666666666666, \frac{-0.5625 \cdot \left(a \cdot a\right)}{{b}^{5}}\right), c, \frac{a}{{b}^{3}} \cdot -0.375\right), c, -0.5 \cdot {b}^{-1}\right) \cdot c \end{array} \]
(FPCore (a b c)
 :precision binary64
 (*
  (fma
   (fma
    (fma
     (* (/ c a) (/ (* (/ (pow a 4.0) (pow b 6.0)) 6.328125) b))
     -0.16666666666666666
     (/ (* -0.5625 (* a a)) (pow b 5.0)))
    c
    (* (/ a (pow b 3.0)) -0.375))
   c
   (* -0.5 (pow b -1.0)))
  c))
double code(double a, double b, double c) {
	return fma(fma(fma(((c / a) * (((pow(a, 4.0) / pow(b, 6.0)) * 6.328125) / b)), -0.16666666666666666, ((-0.5625 * (a * a)) / pow(b, 5.0))), c, ((a / pow(b, 3.0)) * -0.375)), c, (-0.5 * pow(b, -1.0))) * c;
}
function code(a, b, c)
	return Float64(fma(fma(fma(Float64(Float64(c / a) * Float64(Float64(Float64((a ^ 4.0) / (b ^ 6.0)) * 6.328125) / b)), -0.16666666666666666, Float64(Float64(-0.5625 * Float64(a * a)) / (b ^ 5.0))), c, Float64(Float64(a / (b ^ 3.0)) * -0.375)), c, Float64(-0.5 * (b ^ -1.0))) * c)
end
code[a_, b_, c_] := N[(N[(N[(N[(N[(N[(c / a), $MachinePrecision] * N[(N[(N[(N[Power[a, 4.0], $MachinePrecision] / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision] * 6.328125), $MachinePrecision] / b), $MachinePrecision]), $MachinePrecision] * -0.16666666666666666 + N[(N[(-0.5625 * N[(a * a), $MachinePrecision]), $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c + N[(N[(a / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision] * -0.375), $MachinePrecision]), $MachinePrecision] * c + N[(-0.5 * N[Power[b, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]
\begin{array}{l}

\\
\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{c}{a} \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{b}, -0.16666666666666666, \frac{-0.5625 \cdot \left(a \cdot a\right)}{{b}^{5}}\right), c, \frac{a}{{b}^{3}} \cdot -0.375\right), c, -0.5 \cdot {b}^{-1}\right) \cdot c
\end{array}
Derivation
  1. Initial program 52.0%

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

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

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

Alternative 7: 91.0% accurate, N/A× speedup?

\[\begin{array}{l} \\ \frac{\mathsf{fma}\left(-1.0546875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{6}}, \mathsf{fma}\left(-0.5625, \frac{{\left(a \cdot c\right)}^{2}}{{b}^{4}}, -0.375 \cdot \frac{a \cdot c}{b \cdot b}\right)\right) - 0.5}{b} \cdot c \end{array} \]
(FPCore (a b c)
 :precision binary64
 (*
  (/
   (-
    (fma
     -1.0546875
     (/ (pow (* a c) 3.0) (pow b 6.0))
     (fma
      -0.5625
      (/ (pow (* a c) 2.0) (pow b 4.0))
      (* -0.375 (/ (* a c) (* b b)))))
    0.5)
   b)
  c))
double code(double a, double b, double c) {
	return ((fma(-1.0546875, (pow((a * c), 3.0) / pow(b, 6.0)), fma(-0.5625, (pow((a * c), 2.0) / pow(b, 4.0)), (-0.375 * ((a * c) / (b * b))))) - 0.5) / b) * c;
}
function code(a, b, c)
	return Float64(Float64(Float64(fma(-1.0546875, Float64((Float64(a * c) ^ 3.0) / (b ^ 6.0)), fma(-0.5625, Float64((Float64(a * c) ^ 2.0) / (b ^ 4.0)), Float64(-0.375 * Float64(Float64(a * c) / Float64(b * b))))) - 0.5) / b) * c)
end
code[a_, b_, c_] := N[(N[(N[(N[(-1.0546875 * N[(N[Power[N[(a * c), $MachinePrecision], 3.0], $MachinePrecision] / N[Power[b, 6.0], $MachinePrecision]), $MachinePrecision] + N[(-0.5625 * N[(N[Power[N[(a * c), $MachinePrecision], 2.0], $MachinePrecision] / N[Power[b, 4.0], $MachinePrecision]), $MachinePrecision] + N[(-0.375 * N[(N[(a * c), $MachinePrecision] / N[(b * b), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] - 0.5), $MachinePrecision] / b), $MachinePrecision] * c), $MachinePrecision]
\begin{array}{l}

\\
\frac{\mathsf{fma}\left(-1.0546875, \frac{{\left(a \cdot c\right)}^{3}}{{b}^{6}}, \mathsf{fma}\left(-0.5625, \frac{{\left(a \cdot c\right)}^{2}}{{b}^{4}}, -0.375 \cdot \frac{a \cdot c}{b \cdot b}\right)\right) - 0.5}{b} \cdot c
\end{array}
Derivation
  1. Initial program 52.0%

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{c}{a} \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{b}, -0.16666666666666666, \frac{-0.5625 \cdot \left(a \cdot a\right)}{{b}^{5}}\right), c, \frac{a}{{b}^{3}} \cdot -0.375\right), c, -0.5 \cdot {b}^{-1}\right) \cdot c} \]
  5. Taylor expanded in c around -inf

    \[\leadsto \left(-1 \cdot \left({c}^{3} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\frac{3}{8} \cdot \frac{a}{{b}^{3}} + \frac{1}{2} \cdot \frac{1}{b \cdot c}}{c} + \frac{-9}{16} \cdot \frac{{a}^{2}}{{b}^{5}}}{c} + \frac{135}{128} \cdot \frac{{a}^{3}}{{b}^{7}}\right)\right)\right) \cdot c \]
  6. Applied rewrites92.0%

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

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(\left(\left(c \cdot c\right) \cdot c\right) \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(\frac{3}{8}, \frac{a \cdot c}{{b}^{3}}, \frac{1}{2} \cdot \frac{1}{b}\right)}{{c}^{2}}, \frac{-9}{16} \cdot \frac{a \cdot a}{{b}^{5}}\right)}{c}, \frac{135}{128} \cdot \frac{\left(a \cdot a\right) \cdot a}{{b}^{7}}\right)\right)\right) \cdot c \]
    5. lift-pow.f64N/A

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

      \[\leadsto \left(-1 \cdot \left(\left(\left(c \cdot c\right) \cdot c\right) \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(\frac{3}{8}, \frac{a \cdot c}{{b}^{3}}, \frac{1}{2} \cdot \frac{1}{b}\right)}{{c}^{2}}, \frac{-9}{16} \cdot \frac{a \cdot a}{{b}^{5}}\right)}{c}, \frac{135}{128} \cdot \frac{\left(a \cdot a\right) \cdot a}{{b}^{7}}\right)\right)\right) \cdot c \]
    7. inv-powN/A

      \[\leadsto \left(-1 \cdot \left(\left(\left(c \cdot c\right) \cdot c\right) \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(\frac{3}{8}, \frac{a \cdot c}{{b}^{3}}, \frac{1}{2} \cdot {b}^{-1}\right)}{{c}^{2}}, \frac{-9}{16} \cdot \frac{a \cdot a}{{b}^{5}}\right)}{c}, \frac{135}{128} \cdot \frac{\left(a \cdot a\right) \cdot a}{{b}^{7}}\right)\right)\right) \cdot c \]
    8. lower-pow.f64N/A

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

      \[\leadsto \left(-1 \cdot \left(\left(\left(c \cdot c\right) \cdot c\right) \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(\frac{3}{8}, \frac{a \cdot c}{{b}^{3}}, \frac{1}{2} \cdot {b}^{-1}\right)}{c \cdot c}, \frac{-9}{16} \cdot \frac{a \cdot a}{{b}^{5}}\right)}{c}, \frac{135}{128} \cdot \frac{\left(a \cdot a\right) \cdot a}{{b}^{7}}\right)\right)\right) \cdot c \]
    10. lift-*.f6492.1

      \[\leadsto \left(-1 \cdot \left(\left(\left(c \cdot c\right) \cdot c\right) \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(0.375, \frac{a \cdot c}{{b}^{3}}, 0.5 \cdot {b}^{-1}\right)}{c \cdot c}, -0.5625 \cdot \frac{a \cdot a}{{b}^{5}}\right)}{c}, 1.0546875 \cdot \frac{\left(a \cdot a\right) \cdot a}{{b}^{7}}\right)\right)\right) \cdot c \]
  9. Applied rewrites92.1%

    \[\leadsto \left(-1 \cdot \left(\left(\left(c \cdot c\right) \cdot c\right) \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(0.375, \frac{a \cdot c}{{b}^{3}}, 0.5 \cdot {b}^{-1}\right)}{c \cdot c}, -0.5625 \cdot \frac{a \cdot a}{{b}^{5}}\right)}{c}, 1.0546875 \cdot \frac{\left(a \cdot a\right) \cdot a}{{b}^{7}}\right)\right)\right) \cdot c \]
  10. Taylor expanded in b around inf

    \[\leadsto \frac{\left(\frac{-135}{128} \cdot \frac{{a}^{3} \cdot {c}^{3}}{{b}^{6}} + \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b}^{4}} + \frac{-3}{8} \cdot \frac{a \cdot c}{{b}^{2}}\right)\right) - \frac{1}{2}}{b} \cdot c \]
  11. Step-by-step derivation
    1. lower-/.f64N/A

      \[\leadsto \frac{\left(\frac{-135}{128} \cdot \frac{{a}^{3} \cdot {c}^{3}}{{b}^{6}} + \left(\frac{-9}{16} \cdot \frac{{a}^{2} \cdot {c}^{2}}{{b}^{4}} + \frac{-3}{8} \cdot \frac{a \cdot c}{{b}^{2}}\right)\right) - \frac{1}{2}}{b} \cdot c \]
  12. Applied rewrites92.3%

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

Alternative 8: 90.8% accurate, N/A× speedup?

\[\begin{array}{l} \\ \left(\left(-1 \cdot \left(\left(c \cdot c\right) \cdot c\right)\right) \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(0.375, \frac{a \cdot c}{{b}^{3}}, 0.5 \cdot {b}^{-1}\right)}{c \cdot c}, -0.5625 \cdot \frac{a \cdot a}{{b}^{5}}\right)}{c}, 1.0546875 \cdot \frac{\left(a \cdot a\right) \cdot a}{{b}^{7}}\right)\right) \cdot c \end{array} \]
(FPCore (a b c)
 :precision binary64
 (*
  (*
   (* -1.0 (* (* c c) c))
   (fma
    -1.0
    (/
     (fma
      -1.0
      (/ (fma 0.375 (/ (* a c) (pow b 3.0)) (* 0.5 (pow b -1.0))) (* c c))
      (* -0.5625 (/ (* a a) (pow b 5.0))))
     c)
    (* 1.0546875 (/ (* (* a a) a) (pow b 7.0)))))
  c))
double code(double a, double b, double c) {
	return ((-1.0 * ((c * c) * c)) * fma(-1.0, (fma(-1.0, (fma(0.375, ((a * c) / pow(b, 3.0)), (0.5 * pow(b, -1.0))) / (c * c)), (-0.5625 * ((a * a) / pow(b, 5.0)))) / c), (1.0546875 * (((a * a) * a) / pow(b, 7.0))))) * c;
}
function code(a, b, c)
	return Float64(Float64(Float64(-1.0 * Float64(Float64(c * c) * c)) * fma(-1.0, Float64(fma(-1.0, Float64(fma(0.375, Float64(Float64(a * c) / (b ^ 3.0)), Float64(0.5 * (b ^ -1.0))) / Float64(c * c)), Float64(-0.5625 * Float64(Float64(a * a) / (b ^ 5.0)))) / c), Float64(1.0546875 * Float64(Float64(Float64(a * a) * a) / (b ^ 7.0))))) * c)
end
code[a_, b_, c_] := N[(N[(N[(-1.0 * N[(N[(c * c), $MachinePrecision] * c), $MachinePrecision]), $MachinePrecision] * N[(-1.0 * N[(N[(-1.0 * N[(N[(0.375 * N[(N[(a * c), $MachinePrecision] / N[Power[b, 3.0], $MachinePrecision]), $MachinePrecision] + N[(0.5 * N[Power[b, -1.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / N[(c * c), $MachinePrecision]), $MachinePrecision] + N[(-0.5625 * N[(N[(a * a), $MachinePrecision] / N[Power[b, 5.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] / c), $MachinePrecision] + N[(1.0546875 * N[(N[(N[(a * a), $MachinePrecision] * a), $MachinePrecision] / N[Power[b, 7.0], $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision] * c), $MachinePrecision]
\begin{array}{l}

\\
\left(\left(-1 \cdot \left(\left(c \cdot c\right) \cdot c\right)\right) \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(0.375, \frac{a \cdot c}{{b}^{3}}, 0.5 \cdot {b}^{-1}\right)}{c \cdot c}, -0.5625 \cdot \frac{a \cdot a}{{b}^{5}}\right)}{c}, 1.0546875 \cdot \frac{\left(a \cdot a\right) \cdot a}{{b}^{7}}\right)\right) \cdot c
\end{array}
Derivation
  1. Initial program 52.0%

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

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

    \[\leadsto \color{blue}{\mathsf{fma}\left(\mathsf{fma}\left(\mathsf{fma}\left(\frac{c}{a} \cdot \frac{\frac{{a}^{4}}{{b}^{6}} \cdot 6.328125}{b}, -0.16666666666666666, \frac{-0.5625 \cdot \left(a \cdot a\right)}{{b}^{5}}\right), c, \frac{a}{{b}^{3}} \cdot -0.375\right), c, -0.5 \cdot {b}^{-1}\right) \cdot c} \]
  5. Taylor expanded in c around -inf

    \[\leadsto \left(-1 \cdot \left({c}^{3} \cdot \left(-1 \cdot \frac{-1 \cdot \frac{\frac{3}{8} \cdot \frac{a}{{b}^{3}} + \frac{1}{2} \cdot \frac{1}{b \cdot c}}{c} + \frac{-9}{16} \cdot \frac{{a}^{2}}{{b}^{5}}}{c} + \frac{135}{128} \cdot \frac{{a}^{3}}{{b}^{7}}\right)\right)\right) \cdot c \]
  6. Applied rewrites92.0%

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

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

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

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

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

      \[\leadsto \left(-1 \cdot \left(\left(\left(c \cdot c\right) \cdot c\right) \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(\frac{3}{8}, \frac{a \cdot c}{{b}^{3}}, \frac{1}{2} \cdot \frac{1}{b}\right)}{{c}^{2}}, \frac{-9}{16} \cdot \frac{a \cdot a}{{b}^{5}}\right)}{c}, \frac{135}{128} \cdot \frac{\left(a \cdot a\right) \cdot a}{{b}^{7}}\right)\right)\right) \cdot c \]
    5. lift-pow.f64N/A

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

      \[\leadsto \left(-1 \cdot \left(\left(\left(c \cdot c\right) \cdot c\right) \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(\frac{3}{8}, \frac{a \cdot c}{{b}^{3}}, \frac{1}{2} \cdot \frac{1}{b}\right)}{{c}^{2}}, \frac{-9}{16} \cdot \frac{a \cdot a}{{b}^{5}}\right)}{c}, \frac{135}{128} \cdot \frac{\left(a \cdot a\right) \cdot a}{{b}^{7}}\right)\right)\right) \cdot c \]
    7. inv-powN/A

      \[\leadsto \left(-1 \cdot \left(\left(\left(c \cdot c\right) \cdot c\right) \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(\frac{3}{8}, \frac{a \cdot c}{{b}^{3}}, \frac{1}{2} \cdot {b}^{-1}\right)}{{c}^{2}}, \frac{-9}{16} \cdot \frac{a \cdot a}{{b}^{5}}\right)}{c}, \frac{135}{128} \cdot \frac{\left(a \cdot a\right) \cdot a}{{b}^{7}}\right)\right)\right) \cdot c \]
    8. lower-pow.f64N/A

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

      \[\leadsto \left(-1 \cdot \left(\left(\left(c \cdot c\right) \cdot c\right) \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(\frac{3}{8}, \frac{a \cdot c}{{b}^{3}}, \frac{1}{2} \cdot {b}^{-1}\right)}{c \cdot c}, \frac{-9}{16} \cdot \frac{a \cdot a}{{b}^{5}}\right)}{c}, \frac{135}{128} \cdot \frac{\left(a \cdot a\right) \cdot a}{{b}^{7}}\right)\right)\right) \cdot c \]
    10. lift-*.f6492.1

      \[\leadsto \left(-1 \cdot \left(\left(\left(c \cdot c\right) \cdot c\right) \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(0.375, \frac{a \cdot c}{{b}^{3}}, 0.5 \cdot {b}^{-1}\right)}{c \cdot c}, -0.5625 \cdot \frac{a \cdot a}{{b}^{5}}\right)}{c}, 1.0546875 \cdot \frac{\left(a \cdot a\right) \cdot a}{{b}^{7}}\right)\right)\right) \cdot c \]
  9. Applied rewrites92.1%

    \[\leadsto \left(-1 \cdot \left(\left(\left(c \cdot c\right) \cdot c\right) \cdot \mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(-1, \frac{\mathsf{fma}\left(0.375, \frac{a \cdot c}{{b}^{3}}, 0.5 \cdot {b}^{-1}\right)}{c \cdot c}, -0.5625 \cdot \frac{a \cdot a}{{b}^{5}}\right)}{c}, 1.0546875 \cdot \frac{\left(a \cdot a\right) \cdot a}{{b}^{7}}\right)\right)\right) \cdot c \]
  10. Final simplification92.1%

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

Reproduce

?
herbie shell --seed 2025065 
(FPCore (a b c)
  :name "Cubic critical, narrow range"
  :precision binary64
  :pre (and (and (and (< 1.0536712127723509e-8 a) (< a 94906265.62425156)) (and (< 1.0536712127723509e-8 b) (< b 94906265.62425156))) (and (< 1.0536712127723509e-8 c) (< c 94906265.62425156)))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3.0 a) c)))) (* 3.0 a)))