Cubic critical, wide range

Percentage Accurate: 17.6% → 99.9%
Time: 8.8s
Alternatives: 5
Speedup: TODO×

Specification

?
\[\begin{array}{l} t_0 := 3 \cdot a\\ \frac{\left(-b\right) + \sqrt{b \cdot b - t_0 \cdot c}}{t_0} \end{array} \]

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

Alternative 1?

\[\frac{c}{\left(-b\right) - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}} \]
Derivation
  1. Initial program 17.5%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Step-by-step derivation
    1. add-exp-log17.4%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{e^{\log \left(\left(3 \cdot a\right) \cdot c\right)}}}}{3 \cdot a} \]
    2. *-commutative17.4%

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

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - e^{\log \left(c \cdot \color{blue}{\left(a \cdot 3\right)}\right)}}}{3 \cdot a} \]
  3. Applied egg-rr17.4%

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

      \[\leadsto \frac{\color{blue}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}} \cdot \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}}}{\left(-b\right) - \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}}}}}{3 \cdot a} \]
    2. add-sqr-sqrt18.0%

      \[\leadsto \frac{\frac{\left(-b\right) \cdot \left(-b\right) - \color{blue}{\left(b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}\right)}}{\left(-b\right) - \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}}}}{3 \cdot a} \]
    3. add-exp-log18.1%

      \[\leadsto \frac{\frac{\left(-b\right) \cdot \left(-b\right) - \left(b \cdot b - \color{blue}{c \cdot \left(a \cdot 3\right)}\right)}{\left(-b\right) - \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}}}}{3 \cdot a} \]
    4. add-exp-log18.1%

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

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

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

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

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

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

      \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\frac{\left(b \cdot b - b \cdot b\right) + c \cdot \left(a \cdot 3\right)}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)}}}{3 \cdot a}\right)} - 1} \]
  9. Applied egg-rr20.6%

    \[\leadsto \color{blue}{e^{\mathsf{log1p}\left(\frac{\mathsf{fma}\left(c, a \cdot 3, 0\right)}{\left(a \cdot 3\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)}\right)}\right)} - 1} \]
  10. Step-by-step derivation
    1. expm1-def83.9%

      \[\leadsto \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\frac{\mathsf{fma}\left(c, a \cdot 3, 0\right)}{\left(a \cdot 3\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)}\right)}\right)\right)} \]
    2. expm1-log1p99.4%

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

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

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

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

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

      \[\leadsto \frac{\frac{c \cdot \left(a \cdot 3\right)}{a \cdot 3}}{\left(-b\right) - \sqrt{\mathsf{fma}\left(b, b, -\color{blue}{\left(c \cdot a\right) \cdot 3}\right)}} \]
    8. distribute-rgt-neg-in99.7%

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

      \[\leadsto \frac{\frac{c \cdot \left(a \cdot 3\right)}{a \cdot 3}}{\left(-b\right) - \sqrt{\mathsf{fma}\left(b, b, \left(c \cdot a\right) \cdot \color{blue}{-3}\right)}} \]
    10. *-commutative99.7%

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

    \[\leadsto \color{blue}{\frac{\frac{c \cdot \left(a \cdot 3\right)}{a \cdot 3}}{\left(-b\right) - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}}} \]
  12. Taylor expanded in c around 0 99.9%

    \[\leadsto \frac{\color{blue}{c}}{\left(-b\right) - \sqrt{\mathsf{fma}\left(b, b, -3 \cdot \left(c \cdot a\right)\right)}} \]
  13. Final simplification99.9%

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

Alternative 2?

\[\frac{\frac{\left(c \cdot a\right) \cdot 3}{\left(-b\right) - \sqrt{b \cdot b - c \cdot \left(a \cdot 3\right)}}}{a \cdot 3} \]
Derivation
  1. Initial program 17.5%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Step-by-step derivation
    1. add-exp-log17.4%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{e^{\log \left(\left(3 \cdot a\right) \cdot c\right)}}}}{3 \cdot a} \]
    2. *-commutative17.4%

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

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - e^{\log \left(c \cdot \color{blue}{\left(a \cdot 3\right)}\right)}}}{3 \cdot a} \]
  3. Applied egg-rr17.4%

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

      \[\leadsto \frac{\color{blue}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}} \cdot \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}}}{\left(-b\right) - \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}}}}}{3 \cdot a} \]
    2. add-sqr-sqrt18.0%

      \[\leadsto \frac{\frac{\left(-b\right) \cdot \left(-b\right) - \color{blue}{\left(b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}\right)}}{\left(-b\right) - \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}}}}{3 \cdot a} \]
    3. add-exp-log18.1%

      \[\leadsto \frac{\frac{\left(-b\right) \cdot \left(-b\right) - \left(b \cdot b - \color{blue}{c \cdot \left(a \cdot 3\right)}\right)}{\left(-b\right) - \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}}}}{3 \cdot a} \]
    4. add-exp-log18.1%

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

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

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

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

Alternative 3?

\[\begin{array}{l} t_0 := c \cdot \left(a \cdot 3\right)\\ \frac{\frac{t_0}{\left(-b\right) - \sqrt{b \cdot b - t_0}}}{a \cdot 3} \end{array} \]
Derivation
  1. Initial program 17.5%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Step-by-step derivation
    1. add-exp-log17.4%

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - \color{blue}{e^{\log \left(\left(3 \cdot a\right) \cdot c\right)}}}}{3 \cdot a} \]
    2. *-commutative17.4%

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

      \[\leadsto \frac{\left(-b\right) + \sqrt{b \cdot b - e^{\log \left(c \cdot \color{blue}{\left(a \cdot 3\right)}\right)}}}{3 \cdot a} \]
  3. Applied egg-rr17.4%

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

      \[\leadsto \frac{\color{blue}{\frac{\left(-b\right) \cdot \left(-b\right) - \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}} \cdot \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}}}{\left(-b\right) - \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}}}}}{3 \cdot a} \]
    2. add-sqr-sqrt18.0%

      \[\leadsto \frac{\frac{\left(-b\right) \cdot \left(-b\right) - \color{blue}{\left(b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}\right)}}{\left(-b\right) - \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}}}}{3 \cdot a} \]
    3. add-exp-log18.1%

      \[\leadsto \frac{\frac{\left(-b\right) \cdot \left(-b\right) - \left(b \cdot b - \color{blue}{c \cdot \left(a \cdot 3\right)}\right)}{\left(-b\right) - \sqrt{b \cdot b - e^{\log \left(c \cdot \left(a \cdot 3\right)\right)}}}}{3 \cdot a} \]
    4. add-exp-log18.1%

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

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

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

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

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

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

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

Alternative 4?

\[-0.375 \cdot \frac{c \cdot c}{\frac{{b}^{3}}{a}} + -0.5 \cdot \frac{c}{b} \]
Derivation
  1. Initial program 17.5%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Step-by-step derivation
    1. /-rgt-identity17.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{-1 \cdot \left(3 \cdot a\right)}} \]
    11. neg-mul-117.5%

      \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{-3 \cdot a}} \]
    12. distribute-rgt-neg-in17.5%

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

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

      \[\leadsto \color{blue}{-0.3333333333333333} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a} \]
    15. neg-mul-117.5%

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

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

    \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b} + -0.375 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}}} \]
  5. Step-by-step derivation
    1. +-commutative95.5%

      \[\leadsto \color{blue}{-0.375 \cdot \frac{{c}^{2} \cdot a}{{b}^{3}} + -0.5 \cdot \frac{c}{b}} \]
    2. fma-def95.5%

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

      \[\leadsto \mathsf{fma}\left(-0.375, \color{blue}{\frac{{c}^{2}}{\frac{{b}^{3}}{a}}}, -0.5 \cdot \frac{c}{b}\right) \]
    4. unpow295.5%

      \[\leadsto \mathsf{fma}\left(-0.375, \frac{\color{blue}{c \cdot c}}{\frac{{b}^{3}}{a}}, -0.5 \cdot \frac{c}{b}\right) \]
  6. Simplified95.5%

    \[\leadsto \color{blue}{\mathsf{fma}\left(-0.375, \frac{c \cdot c}{\frac{{b}^{3}}{a}}, -0.5 \cdot \frac{c}{b}\right)} \]
  7. Step-by-step derivation
    1. fma-udef95.5%

      \[\leadsto \color{blue}{-0.375 \cdot \frac{c \cdot c}{\frac{{b}^{3}}{a}} + -0.5 \cdot \frac{c}{b}} \]
  8. Applied egg-rr95.5%

    \[\leadsto \color{blue}{-0.375 \cdot \frac{c \cdot c}{\frac{{b}^{3}}{a}} + -0.5 \cdot \frac{c}{b}} \]
  9. Final simplification95.5%

    \[\leadsto -0.375 \cdot \frac{c \cdot c}{\frac{{b}^{3}}{a}} + -0.5 \cdot \frac{c}{b} \]

Alternative 5?

\[-0.5 \cdot \frac{c}{b} \]
Derivation
  1. Initial program 17.5%

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a} \]
  2. Step-by-step derivation
    1. /-rgt-identity17.5%

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

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

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

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

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

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

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

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

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

      \[\leadsto \color{blue}{\frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{-1 \cdot \left(3 \cdot a\right)}} \]
    11. neg-mul-117.5%

      \[\leadsto \frac{-1 \cdot \left(\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}{\color{blue}{-3 \cdot a}} \]
    12. distribute-rgt-neg-in17.5%

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

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

      \[\leadsto \color{blue}{-0.3333333333333333} \cdot \frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{-a} \]
    15. neg-mul-117.5%

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

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

    \[\leadsto \color{blue}{-0.5 \cdot \frac{c}{b}} \]
  5. Final simplification90.8%

    \[\leadsto -0.5 \cdot \frac{c}{b} \]

Reproduce

?
herbie shell --seed 2023166 
(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)))