Average Error: 3.3 → 1.0
Time: 9.1s
Precision: 64
\[x \cdot \left(\frac{y}{z} - a\right)\]
\[\left(-a\right) \cdot x + \frac{x}{\frac{\sqrt[3]{z}}{\sqrt[3]{y}} \cdot \frac{\sqrt[3]{z}}{\sqrt[3]{y}}} \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{z}}\]
x \cdot \left(\frac{y}{z} - a\right)
\left(-a\right) \cdot x + \frac{x}{\frac{\sqrt[3]{z}}{\sqrt[3]{y}} \cdot \frac{\sqrt[3]{z}}{\sqrt[3]{y}}} \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{z}}
double f(double x, double y, double z, double a) {
        double r523446 = x;
        double r523447 = y;
        double r523448 = z;
        double r523449 = r523447 / r523448;
        double r523450 = a;
        double r523451 = r523449 - r523450;
        double r523452 = r523446 * r523451;
        return r523452;
}

double f(double x, double y, double z, double a) {
        double r523453 = a;
        double r523454 = -r523453;
        double r523455 = x;
        double r523456 = r523454 * r523455;
        double r523457 = z;
        double r523458 = cbrt(r523457);
        double r523459 = y;
        double r523460 = cbrt(r523459);
        double r523461 = r523458 / r523460;
        double r523462 = r523461 * r523461;
        double r523463 = r523455 / r523462;
        double r523464 = r523460 / r523458;
        double r523465 = r523463 * r523464;
        double r523466 = r523456 + r523465;
        return r523466;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Bits error versus a

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 3.3

    \[x \cdot \left(\frac{y}{z} - a\right)\]
  2. Using strategy rm
  3. Applied sub-neg3.3

    \[\leadsto x \cdot \color{blue}{\left(\frac{y}{z} + \left(-a\right)\right)}\]
  4. Applied distribute-lft-in3.3

    \[\leadsto \color{blue}{x \cdot \frac{y}{z} + x \cdot \left(-a\right)}\]
  5. Using strategy rm
  6. Applied add-cube-cbrt3.8

    \[\leadsto x \cdot \frac{y}{\color{blue}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}}} + x \cdot \left(-a\right)\]
  7. Applied add-cube-cbrt3.9

    \[\leadsto x \cdot \frac{\color{blue}{\left(\sqrt[3]{y} \cdot \sqrt[3]{y}\right) \cdot \sqrt[3]{y}}}{\left(\sqrt[3]{z} \cdot \sqrt[3]{z}\right) \cdot \sqrt[3]{z}} + x \cdot \left(-a\right)\]
  8. Applied times-frac3.9

    \[\leadsto x \cdot \color{blue}{\left(\frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{z} \cdot \sqrt[3]{z}} \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{z}}\right)} + x \cdot \left(-a\right)\]
  9. Applied associate-*r*1.1

    \[\leadsto \color{blue}{\left(x \cdot \frac{\sqrt[3]{y} \cdot \sqrt[3]{y}}{\sqrt[3]{z} \cdot \sqrt[3]{z}}\right) \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{z}}} + x \cdot \left(-a\right)\]
  10. Simplified1.0

    \[\leadsto \color{blue}{\frac{x}{\frac{\sqrt[3]{z}}{\sqrt[3]{y}} \cdot \frac{\sqrt[3]{z}}{\sqrt[3]{y}}}} \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{z}} + x \cdot \left(-a\right)\]
  11. Final simplification1.0

    \[\leadsto \left(-a\right) \cdot x + \frac{x}{\frac{\sqrt[3]{z}}{\sqrt[3]{y}} \cdot \frac{\sqrt[3]{z}}{\sqrt[3]{y}}} \cdot \frac{\sqrt[3]{y}}{\sqrt[3]{z}}\]

Reproduce

herbie shell --seed 1 
(FPCore (x y z a)
  :name "x*(y/z-a)"
  (* x (- (/ y z) a)))