Average Error: 0.1 → 0.2
Time: 24.7s
Precision: 64
\[x \cdot \cos y + z \cdot \sin y\]
\[\left(x \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) + z \cdot \sin y\]
x \cdot \cos y + z \cdot \sin y
\left(x \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) + z \cdot \sin y
double f(double x, double y, double z) {
        double r136002 = x;
        double r136003 = y;
        double r136004 = cos(r136003);
        double r136005 = r136002 * r136004;
        double r136006 = z;
        double r136007 = sin(r136003);
        double r136008 = r136006 * r136007;
        double r136009 = r136005 + r136008;
        return r136009;
}

double f(double x, double y, double z) {
        double r136010 = x;
        double r136011 = y;
        double r136012 = cos(r136011);
        double r136013 = 2.0;
        double r136014 = pow(r136012, r136013);
        double r136015 = 0.3333333333333333;
        double r136016 = pow(r136014, r136015);
        double r136017 = r136010 * r136016;
        double r136018 = cbrt(r136012);
        double r136019 = log1p(r136018);
        double r136020 = expm1(r136019);
        double r136021 = r136017 * r136020;
        double r136022 = z;
        double r136023 = sin(r136011);
        double r136024 = r136022 * r136023;
        double r136025 = r136021 + r136024;
        return r136025;
}

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 \cos y + z \cdot \sin y\]
  2. Using strategy rm
  3. Applied add-cube-cbrt0.4

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

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

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

    \[\leadsto \left(x \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} + z \cdot \sin y\]
  8. Applied pow-prod-down0.2

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

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

    \[\leadsto \left(x \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)} + z \cdot \sin y\]
  12. Final simplification0.2

    \[\leadsto \left(x \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) + z \cdot \sin y\]

Reproduce

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