Average Error: 0.1 → 0.2
Time: 18.0s
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 \log \left(e^{\sqrt[3]{\cos y}}\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 \log \left(e^{\sqrt[3]{\cos y}}\right) - z \cdot \sin y
double f(double x, double y, double z) {
        double r124981 = x;
        double r124982 = y;
        double r124983 = cos(r124982);
        double r124984 = r124981 * r124983;
        double r124985 = z;
        double r124986 = sin(r124982);
        double r124987 = r124985 * r124986;
        double r124988 = r124984 - r124987;
        return r124988;
}

double f(double x, double y, double z) {
        double r124989 = x;
        double r124990 = y;
        double r124991 = cos(r124990);
        double r124992 = 2.0;
        double r124993 = pow(r124991, r124992);
        double r124994 = 0.3333333333333333;
        double r124995 = pow(r124993, r124994);
        double r124996 = r124989 * r124995;
        double r124997 = cbrt(r124991);
        double r124998 = exp(r124997);
        double r124999 = log(r124998);
        double r125000 = r124996 * r124999;
        double r125001 = z;
        double r125002 = sin(r124990);
        double r125003 = r125001 * r125002;
        double r125004 = r125000 - r125003;
        return r125004;
}

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 cbrt-unprod0.3

    \[\leadsto \left(x \cdot \color{blue}{\sqrt[3]{\cos y \cdot \cos y}}\right) \cdot \sqrt[3]{\cos y} - z \cdot \sin y\]
  7. Simplified0.3

    \[\leadsto \left(x \cdot \sqrt[3]{\color{blue}{{\left(\cos y\right)}^{2}}}\right) \cdot \sqrt[3]{\cos y} - z \cdot \sin y\]
  8. Using strategy rm
  9. Applied add-log-exp0.3

    \[\leadsto \left(x \cdot \sqrt[3]{{\left(\cos y\right)}^{2}}\right) \cdot \color{blue}{\log \left(e^{\sqrt[3]{\cos y}}\right)} - z \cdot \sin y\]
  10. Using strategy rm
  11. Applied pow1/30.2

    \[\leadsto \left(x \cdot \color{blue}{{\left({\left(\cos y\right)}^{2}\right)}^{\frac{1}{3}}}\right) \cdot \log \left(e^{\sqrt[3]{\cos y}}\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 \log \left(e^{\sqrt[3]{\cos y}}\right) - z \cdot \sin y\]

Reproduce

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