Average Error: 0.1 → 0.2
Time: 26.2s
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 r140679 = x;
        double r140680 = y;
        double r140681 = sin(r140680);
        double r140682 = r140679 * r140681;
        double r140683 = z;
        double r140684 = cos(r140680);
        double r140685 = r140683 * r140684;
        double r140686 = r140682 + r140685;
        return r140686;
}

double f(double x, double y, double z) {
        double r140687 = x;
        double r140688 = y;
        double r140689 = sin(r140688);
        double r140690 = r140687 * r140689;
        double r140691 = z;
        double r140692 = cos(r140688);
        double r140693 = 2.0;
        double r140694 = pow(r140692, r140693);
        double r140695 = 0.3333333333333333;
        double r140696 = pow(r140694, r140695);
        double r140697 = r140691 * r140696;
        double r140698 = cbrt(r140692);
        double r140699 = log1p(r140698);
        double r140700 = expm1(r140699);
        double r140701 = r140697 * r140700;
        double r140702 = r140690 + r140701;
        return r140702;
}

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))))