Average Error: 24.1 → 24.2
Time: 13.0s
Precision: 64
\[{\left(\sin x\right)}^{2} + {\left(\cos x\right)}^{2}\]
\[\log \left(\sqrt[3]{{\left(e^{{\left(\sin x\right)}^{2}}\right)}^{3}}\right) + {\left(\cos x\right)}^{2}\]
{\left(\sin x\right)}^{2} + {\left(\cos x\right)}^{2}
\log \left(\sqrt[3]{{\left(e^{{\left(\sin x\right)}^{2}}\right)}^{3}}\right) + {\left(\cos x\right)}^{2}
double f(double x) {
        double r783082 = x;
        double r783083 = sin(r783082);
        double r783084 = 2.0;
        double r783085 = pow(r783083, r783084);
        double r783086 = cos(r783082);
        double r783087 = pow(r783086, r783084);
        double r783088 = r783085 + r783087;
        return r783088;
}

double f(double x) {
        double r783089 = x;
        double r783090 = sin(r783089);
        double r783091 = 2.0;
        double r783092 = pow(r783090, r783091);
        double r783093 = exp(r783092);
        double r783094 = 3.0;
        double r783095 = pow(r783093, r783094);
        double r783096 = cbrt(r783095);
        double r783097 = log(r783096);
        double r783098 = cos(r783089);
        double r783099 = pow(r783098, r783091);
        double r783100 = r783097 + r783099;
        return r783100;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 24.1

    \[{\left(\sin x\right)}^{2} + {\left(\cos x\right)}^{2}\]
  2. Using strategy rm
  3. Applied add-log-exp24.1

    \[\leadsto \color{blue}{\log \left(e^{{\left(\sin x\right)}^{2}}\right)} + {\left(\cos x\right)}^{2}\]
  4. Using strategy rm
  5. Applied add-cbrt-cube24.2

    \[\leadsto \log \color{blue}{\left(\sqrt[3]{\left(e^{{\left(\sin x\right)}^{2}} \cdot e^{{\left(\sin x\right)}^{2}}\right) \cdot e^{{\left(\sin x\right)}^{2}}}\right)} + {\left(\cos x\right)}^{2}\]
  6. Simplified24.2

    \[\leadsto \log \left(\sqrt[3]{\color{blue}{{\left(e^{{\left(\sin x\right)}^{2}}\right)}^{3}}}\right) + {\left(\cos x\right)}^{2}\]
  7. Final simplification24.2

    \[\leadsto \log \left(\sqrt[3]{{\left(e^{{\left(\sin x\right)}^{2}}\right)}^{3}}\right) + {\left(\cos x\right)}^{2}\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "sin(x)^2+cos(x)^2"
  :precision binary64
  (+ (pow (sin x) 2) (pow (cos x) 2)))