Average Error: 15.1 → 1.1
Time: 17.9s
Precision: 64
\[\sqrt{\frac{-c}{a}}\]
\[\sqrt{-\frac{\sqrt[3]{c}}{\sqrt[3]{a}}} \cdot \left|\frac{\sqrt[3]{c}}{\sqrt[3]{a}}\right|\]
\sqrt{\frac{-c}{a}}
\sqrt{-\frac{\sqrt[3]{c}}{\sqrt[3]{a}}} \cdot \left|\frac{\sqrt[3]{c}}{\sqrt[3]{a}}\right|
double f(double c, double a) {
        double r5554095 = c;
        double r5554096 = -r5554095;
        double r5554097 = a;
        double r5554098 = r5554096 / r5554097;
        double r5554099 = sqrt(r5554098);
        return r5554099;
}

double f(double c, double a) {
        double r5554100 = c;
        double r5554101 = cbrt(r5554100);
        double r5554102 = a;
        double r5554103 = cbrt(r5554102);
        double r5554104 = r5554101 / r5554103;
        double r5554105 = -r5554104;
        double r5554106 = sqrt(r5554105);
        double r5554107 = fabs(r5554104);
        double r5554108 = r5554106 * r5554107;
        return r5554108;
}

Error

Bits error versus c

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.1

    \[\sqrt{\frac{-c}{a}}\]
  2. Using strategy rm
  3. Applied add-cube-cbrt15.7

    \[\leadsto \sqrt{\frac{-c}{\color{blue}{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}}}}\]
  4. Applied add-cube-cbrt15.8

    \[\leadsto \sqrt{\frac{-\color{blue}{\left(\sqrt[3]{c} \cdot \sqrt[3]{c}\right) \cdot \sqrt[3]{c}}}{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}}}\]
  5. Applied distribute-rgt-neg-in15.8

    \[\leadsto \sqrt{\frac{\color{blue}{\left(\sqrt[3]{c} \cdot \sqrt[3]{c}\right) \cdot \left(-\sqrt[3]{c}\right)}}{\left(\sqrt[3]{a} \cdot \sqrt[3]{a}\right) \cdot \sqrt[3]{a}}}\]
  6. Applied times-frac15.8

    \[\leadsto \sqrt{\color{blue}{\frac{\sqrt[3]{c} \cdot \sqrt[3]{c}}{\sqrt[3]{a} \cdot \sqrt[3]{a}} \cdot \frac{-\sqrt[3]{c}}{\sqrt[3]{a}}}}\]
  7. Applied sqrt-prod4.6

    \[\leadsto \color{blue}{\sqrt{\frac{\sqrt[3]{c} \cdot \sqrt[3]{c}}{\sqrt[3]{a} \cdot \sqrt[3]{a}}} \cdot \sqrt{\frac{-\sqrt[3]{c}}{\sqrt[3]{a}}}}\]
  8. Simplified1.1

    \[\leadsto \color{blue}{\left|\frac{\sqrt[3]{c}}{\sqrt[3]{a}}\right|} \cdot \sqrt{\frac{-\sqrt[3]{c}}{\sqrt[3]{a}}}\]
  9. Simplified1.1

    \[\leadsto \left|\frac{\sqrt[3]{c}}{\sqrt[3]{a}}\right| \cdot \color{blue}{\sqrt{-\frac{\sqrt[3]{c}}{\sqrt[3]{a}}}}\]
  10. Using strategy rm
  11. Applied *-un-lft-identity1.1

    \[\leadsto \left|\frac{\sqrt[3]{\color{blue}{1 \cdot c}}}{\sqrt[3]{a}}\right| \cdot \sqrt{-\frac{\sqrt[3]{c}}{\sqrt[3]{a}}}\]
  12. Applied cbrt-prod1.1

    \[\leadsto \left|\frac{\color{blue}{\sqrt[3]{1} \cdot \sqrt[3]{c}}}{\sqrt[3]{a}}\right| \cdot \sqrt{-\frac{\sqrt[3]{c}}{\sqrt[3]{a}}}\]
  13. Simplified1.1

    \[\leadsto \left|\frac{\color{blue}{1} \cdot \sqrt[3]{c}}{\sqrt[3]{a}}\right| \cdot \sqrt{-\frac{\sqrt[3]{c}}{\sqrt[3]{a}}}\]
  14. Final simplification1.1

    \[\leadsto \sqrt{-\frac{\sqrt[3]{c}}{\sqrt[3]{a}}} \cdot \left|\frac{\sqrt[3]{c}}{\sqrt[3]{a}}\right|\]

Reproduce

herbie shell --seed 1 
(FPCore (c a)
  :name "sqrt(-c/a)"
  (sqrt (/ (- c) a)))