Average Error: 52.3 → 0.4
Time: 21.2s
Precision: 64
\[4.930380657631323783823303533017413935458 \cdot 10^{-32} \lt a \lt 20282409603651670423947251286016 \land 4.930380657631323783823303533017413935458 \cdot 10^{-32} \lt b \lt 20282409603651670423947251286016 \land 4.930380657631323783823303533017413935458 \cdot 10^{-32} \lt c \lt 20282409603651670423947251286016\]
\[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
\[\frac{c \cdot \left(3 \cdot a\right)}{\left(3 \cdot a\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - e^{\log \left(\left(3 \cdot a\right) \cdot c\right)}}\right)}\]
\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}
\frac{c \cdot \left(3 \cdot a\right)}{\left(3 \cdot a\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - e^{\log \left(\left(3 \cdot a\right) \cdot c\right)}}\right)}
double f(double a, double b, double c) {
        double r75252 = b;
        double r75253 = -r75252;
        double r75254 = r75252 * r75252;
        double r75255 = 3.0;
        double r75256 = a;
        double r75257 = r75255 * r75256;
        double r75258 = c;
        double r75259 = r75257 * r75258;
        double r75260 = r75254 - r75259;
        double r75261 = sqrt(r75260);
        double r75262 = r75253 + r75261;
        double r75263 = r75262 / r75257;
        return r75263;
}

double f(double a, double b, double c) {
        double r75264 = c;
        double r75265 = 3.0;
        double r75266 = a;
        double r75267 = r75265 * r75266;
        double r75268 = r75264 * r75267;
        double r75269 = b;
        double r75270 = -r75269;
        double r75271 = r75269 * r75269;
        double r75272 = r75267 * r75264;
        double r75273 = log(r75272);
        double r75274 = exp(r75273);
        double r75275 = r75271 - r75274;
        double r75276 = sqrt(r75275);
        double r75277 = r75270 - r75276;
        double r75278 = r75267 * r75277;
        double r75279 = r75268 / r75278;
        return r75279;
}

Error

Bits error versus a

Bits error versus b

Bits error versus c

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 52.3

    \[\frac{\left(-b\right) + \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}{3 \cdot a}\]
  2. Using strategy rm
  3. Applied flip-+52.3

    \[\leadsto \frac{\color{blue}{\frac{\left(-b\right) \cdot \left(-b\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(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}}{3 \cdot a}\]
  4. Simplified0.4

    \[\leadsto \frac{\frac{\color{blue}{0 + \left(3 \cdot a\right) \cdot c}}{\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}}}{3 \cdot a}\]
  5. Using strategy rm
  6. Applied div-inv0.5

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

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

    \[\leadsto \frac{0 + \left(3 \cdot a\right) \cdot c}{\color{blue}{\left(3 \cdot a\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot c}\right)}}\]
  9. Using strategy rm
  10. Applied add-exp-log0.4

    \[\leadsto \frac{0 + \left(3 \cdot a\right) \cdot c}{\left(3 \cdot a\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot a\right) \cdot \color{blue}{e^{\log c}}}\right)}\]
  11. Applied add-exp-log0.4

    \[\leadsto \frac{0 + \left(3 \cdot a\right) \cdot c}{\left(3 \cdot a\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(3 \cdot \color{blue}{e^{\log a}}\right) \cdot e^{\log c}}\right)}\]
  12. Applied add-exp-log0.4

    \[\leadsto \frac{0 + \left(3 \cdot a\right) \cdot c}{\left(3 \cdot a\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \left(\color{blue}{e^{\log 3}} \cdot e^{\log a}\right) \cdot e^{\log c}}\right)}\]
  13. Applied prod-exp0.4

    \[\leadsto \frac{0 + \left(3 \cdot a\right) \cdot c}{\left(3 \cdot a\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - \color{blue}{e^{\log 3 + \log a}} \cdot e^{\log c}}\right)}\]
  14. Applied prod-exp0.4

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

    \[\leadsto \frac{0 + \left(3 \cdot a\right) \cdot c}{\left(3 \cdot a\right) \cdot \left(\left(-b\right) - \sqrt{b \cdot b - e^{\color{blue}{\log \left(\left(3 \cdot a\right) \cdot c\right)}}}\right)}\]
  16. Final simplification0.4

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

Reproduce

herbie shell --seed 2019209 
(FPCore (a b c)
  :name "Cubic critical, wide range"
  :precision binary64
  :pre (and (< 4.93038e-32 a 2.02824e31) (< 4.93038e-32 b 2.02824e31) (< 4.93038e-32 c 2.02824e31))
  (/ (+ (- b) (sqrt (- (* b b) (* (* 3 a) c)))) (* 3 a)))