Average Error: 0.3 → 0.4
Time: 10.4s
Precision: 64
\[\left(x \cdot 27\right) \cdot y\]
\[\sqrt{27} \cdot \left(\sqrt{27} \cdot \left(x \cdot y\right)\right)\]
\left(x \cdot 27\right) \cdot y
\sqrt{27} \cdot \left(\sqrt{27} \cdot \left(x \cdot y\right)\right)
double f(double x, double y) {
        double r176445 = x;
        double r176446 = 27.0;
        double r176447 = r176445 * r176446;
        double r176448 = y;
        double r176449 = r176447 * r176448;
        return r176449;
}

double f(double x, double y) {
        double r176450 = 27.0;
        double r176451 = sqrt(r176450);
        double r176452 = x;
        double r176453 = y;
        double r176454 = r176452 * r176453;
        double r176455 = r176451 * r176454;
        double r176456 = r176451 * r176455;
        return r176456;
}

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 0.3

    \[\left(x \cdot 27\right) \cdot y\]
  2. Using strategy rm
  3. Applied associate-*l*0.3

    \[\leadsto \color{blue}{x \cdot \left(27 \cdot y\right)}\]
  4. Using strategy rm
  5. Applied *-un-lft-identity0.3

    \[\leadsto \color{blue}{\left(1 \cdot x\right)} \cdot \left(27 \cdot y\right)\]
  6. Applied associate-*l*0.3

    \[\leadsto \color{blue}{1 \cdot \left(x \cdot \left(27 \cdot y\right)\right)}\]
  7. Simplified0.3

    \[\leadsto 1 \cdot \color{blue}{\left(27 \cdot \left(x \cdot y\right)\right)}\]
  8. Using strategy rm
  9. Applied add-sqr-sqrt0.3

    \[\leadsto 1 \cdot \left(\color{blue}{\left(\sqrt{27} \cdot \sqrt{27}\right)} \cdot \left(x \cdot y\right)\right)\]
  10. Applied associate-*l*0.4

    \[\leadsto 1 \cdot \color{blue}{\left(\sqrt{27} \cdot \left(\sqrt{27} \cdot \left(x \cdot y\right)\right)\right)}\]
  11. Final simplification0.4

    \[\leadsto \sqrt{27} \cdot \left(\sqrt{27} \cdot \left(x \cdot y\right)\right)\]

Reproduce

herbie shell --seed 2019235 
(FPCore (x y)
  :name "Diagrams.Solve.Polynomial:cubForm  from diagrams-solve-0.1, F"
  :precision binary64
  (* (* x 27) y))