Average Error: 0.1 → 0.2
Time: 23.8s
Precision: 64
\[x \cdot \sin y + z \cdot \cos y\]
\[x \cdot \sin y + \left(z \cdot {\left({\left(\cos y\right)}^{2}\right)}^{\frac{1}{3}}\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt[3]{\cos y}\right)\right)\]
x \cdot \sin y + z \cdot \cos y
x \cdot \sin y + \left(z \cdot {\left({\left(\cos y\right)}^{2}\right)}^{\frac{1}{3}}\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt[3]{\cos y}\right)\right)
double f(double x, double y, double z) {
        double r145593 = x;
        double r145594 = y;
        double r145595 = sin(r145594);
        double r145596 = r145593 * r145595;
        double r145597 = z;
        double r145598 = cos(r145594);
        double r145599 = r145597 * r145598;
        double r145600 = r145596 + r145599;
        return r145600;
}

double f(double x, double y, double z) {
        double r145601 = x;
        double r145602 = y;
        double r145603 = sin(r145602);
        double r145604 = r145601 * r145603;
        double r145605 = z;
        double r145606 = cos(r145602);
        double r145607 = 2.0;
        double r145608 = pow(r145606, r145607);
        double r145609 = 0.3333333333333333;
        double r145610 = pow(r145608, r145609);
        double r145611 = r145605 * r145610;
        double r145612 = cbrt(r145606);
        double r145613 = log1p(r145612);
        double r145614 = expm1(r145613);
        double r145615 = r145611 * r145614;
        double r145616 = r145604 + r145615;
        return r145616;
}

Error

Bits error versus x

Bits error versus y

Bits error versus z

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.1

    \[x \cdot \sin y + z \cdot \cos y\]
  2. Using strategy rm
  3. Applied add-cube-cbrt0.4

    \[\leadsto x \cdot \sin y + z \cdot \color{blue}{\left(\left(\sqrt[3]{\cos y} \cdot \sqrt[3]{\cos y}\right) \cdot \sqrt[3]{\cos y}\right)}\]
  4. Applied associate-*r*0.4

    \[\leadsto x \cdot \sin y + \color{blue}{\left(z \cdot \left(\sqrt[3]{\cos y} \cdot \sqrt[3]{\cos y}\right)\right) \cdot \sqrt[3]{\cos y}}\]
  5. Using strategy rm
  6. Applied pow1/316.3

    \[\leadsto x \cdot \sin y + \left(z \cdot \left(\sqrt[3]{\cos y} \cdot \color{blue}{{\left(\cos y\right)}^{\frac{1}{3}}}\right)\right) \cdot \sqrt[3]{\cos y}\]
  7. Applied pow1/316.2

    \[\leadsto x \cdot \sin y + \left(z \cdot \left(\color{blue}{{\left(\cos y\right)}^{\frac{1}{3}}} \cdot {\left(\cos y\right)}^{\frac{1}{3}}\right)\right) \cdot \sqrt[3]{\cos y}\]
  8. Applied pow-prod-down0.2

    \[\leadsto x \cdot \sin y + \left(z \cdot \color{blue}{{\left(\cos y \cdot \cos y\right)}^{\frac{1}{3}}}\right) \cdot \sqrt[3]{\cos y}\]
  9. Simplified0.2

    \[\leadsto x \cdot \sin y + \left(z \cdot {\color{blue}{\left({\left(\cos y\right)}^{2}\right)}}^{\frac{1}{3}}\right) \cdot \sqrt[3]{\cos y}\]
  10. Using strategy rm
  11. Applied expm1-log1p-u0.2

    \[\leadsto x \cdot \sin y + \left(z \cdot {\left({\left(\cos y\right)}^{2}\right)}^{\frac{1}{3}}\right) \cdot \color{blue}{\mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt[3]{\cos y}\right)\right)}\]
  12. Final simplification0.2

    \[\leadsto x \cdot \sin y + \left(z \cdot {\left({\left(\cos y\right)}^{2}\right)}^{\frac{1}{3}}\right) \cdot \mathsf{expm1}\left(\mathsf{log1p}\left(\sqrt[3]{\cos y}\right)\right)\]

Reproduce

herbie shell --seed 2019323 +o rules:numerics
(FPCore (x y z)
  :name "Diagrams.ThreeD.Transform:aboutX from diagrams-lib-1.3.0.3, B"
  :precision binary64
  (+ (* x (sin y)) (* z (cos y))))