Average Error: 14.7 → 1.1
Time: 11.1s
Precision: 64
\[\sqrt{\frac{x}{y}}\]
\[\left|\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right| \cdot \sqrt{\frac{\sqrt[3]{x}}{\sqrt[3]{y}}}\]
\sqrt{\frac{x}{y}}
\left|\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right| \cdot \sqrt{\frac{\sqrt[3]{x}}{\sqrt[3]{y}}}
double f(double x, double y) {
        double r8457873 = x;
        double r8457874 = y;
        double r8457875 = r8457873 / r8457874;
        double r8457876 = sqrt(r8457875);
        return r8457876;
}

double f(double x, double y) {
        double r8457877 = x;
        double r8457878 = cbrt(r8457877);
        double r8457879 = y;
        double r8457880 = cbrt(r8457879);
        double r8457881 = r8457878 / r8457880;
        double r8457882 = fabs(r8457881);
        double r8457883 = sqrt(r8457881);
        double r8457884 = r8457882 * r8457883;
        return r8457884;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 14.7

    \[\sqrt{\frac{x}{y}}\]
  2. Using strategy rm
  3. Applied add-cube-cbrt15.2

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

    \[\leadsto \sqrt{\frac{\color{blue}{\left(\sqrt[3]{x} \cdot \sqrt[3]{x}\right) \cdot \sqrt[3]{x}}}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}\]
  5. Applied times-frac15.4

    \[\leadsto \sqrt{\color{blue}{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{y} \cdot \sqrt[3]{y}} \cdot \frac{\sqrt[3]{x}}{\sqrt[3]{y}}}}\]
  6. Applied sqrt-prod4.3

    \[\leadsto \color{blue}{\sqrt{\frac{\sqrt[3]{x} \cdot \sqrt[3]{x}}{\sqrt[3]{y} \cdot \sqrt[3]{y}}} \cdot \sqrt{\frac{\sqrt[3]{x}}{\sqrt[3]{y}}}}\]
  7. Simplified1.1

    \[\leadsto \color{blue}{\left|\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right|} \cdot \sqrt{\frac{\sqrt[3]{x}}{\sqrt[3]{y}}}\]
  8. Final simplification1.1

    \[\leadsto \left|\frac{\sqrt[3]{x}}{\sqrt[3]{y}}\right| \cdot \sqrt{\frac{\sqrt[3]{x}}{\sqrt[3]{y}}}\]

Reproduce

herbie shell --seed 1 
(FPCore (x y)
  :name "sqrt(x / y)"
  (sqrt (/ x y)))