Average Error: 27.4 → 27.3
Time: 14.0s
Precision: 64
$\sin \left(\sqrt{x} + 1\right) + \cos \left(\sqrt{x}\right)$
$\left(\sqrt[3]{{\left(\cos 1 \cdot \sin \left(\sqrt{x}\right)\right)}^{3}} + \cos \left(\sqrt{x}\right) \cdot \sin 1\right) + \cos \left(\sqrt{x}\right)$
\sin \left(\sqrt{x} + 1\right) + \cos \left(\sqrt{x}\right)
\left(\sqrt[3]{{\left(\cos 1 \cdot \sin \left(\sqrt{x}\right)\right)}^{3}} + \cos \left(\sqrt{x}\right) \cdot \sin 1\right) + \cos \left(\sqrt{x}\right)
double f(double x) {
double r861132 = x;
double r861133 = sqrt(r861132);
double r861134 = 1.0;
double r861135 = r861133 + r861134;
double r861136 = sin(r861135);
double r861137 = cos(r861133);
double r861138 = r861136 + r861137;
return r861138;
}


double f(double x) {
double r861139 = 1.0;
double r861140 = cos(r861139);
double r861141 = x;
double r861142 = sqrt(r861141);
double r861143 = sin(r861142);
double r861144 = r861140 * r861143;
double r861145 = 3.0;
double r861146 = pow(r861144, r861145);
double r861147 = cbrt(r861146);
double r861148 = cos(r861142);
double r861149 = sin(r861139);
double r861150 = r861148 * r861149;
double r861151 = r861147 + r861150;
double r861152 = r861151 + r861148;
return r861152;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 27.4

$\sin \left(\sqrt{x} + 1\right) + \cos \left(\sqrt{x}\right)$
2. Using strategy rm
3. Applied sin-sum27.3

$\leadsto \color{blue}{\left(\sin \left(\sqrt{x}\right) \cdot \cos 1 + \cos \left(\sqrt{x}\right) \cdot \sin 1\right)} + \cos \left(\sqrt{x}\right)$
4. Using strategy rm

$\leadsto \left(\sin \left(\sqrt{x}\right) \cdot \color{blue}{\sqrt[3]{\left(\cos 1 \cdot \cos 1\right) \cdot \cos 1}} + \cos \left(\sqrt{x}\right) \cdot \sin 1\right) + \cos \left(\sqrt{x}\right)$

$\leadsto \left(\color{blue}{\sqrt[3]{\left(\sin \left(\sqrt{x}\right) \cdot \sin \left(\sqrt{x}\right)\right) \cdot \sin \left(\sqrt{x}\right)}} \cdot \sqrt[3]{\left(\cos 1 \cdot \cos 1\right) \cdot \cos 1} + \cos \left(\sqrt{x}\right) \cdot \sin 1\right) + \cos \left(\sqrt{x}\right)$
7. Applied cbrt-unprod27.3

$\leadsto \left(\color{blue}{\sqrt[3]{\left(\left(\sin \left(\sqrt{x}\right) \cdot \sin \left(\sqrt{x}\right)\right) \cdot \sin \left(\sqrt{x}\right)\right) \cdot \left(\left(\cos 1 \cdot \cos 1\right) \cdot \cos 1\right)}} + \cos \left(\sqrt{x}\right) \cdot \sin 1\right) + \cos \left(\sqrt{x}\right)$
8. Simplified27.3

$\leadsto \left(\sqrt[3]{\color{blue}{{\left(\cos 1 \cdot \sin \left(\sqrt{x}\right)\right)}^{3}}} + \cos \left(\sqrt{x}\right) \cdot \sin 1\right) + \cos \left(\sqrt{x}\right)$
9. Final simplification27.3

$\leadsto \left(\sqrt[3]{{\left(\cos 1 \cdot \sin \left(\sqrt{x}\right)\right)}^{3}} + \cos \left(\sqrt{x}\right) \cdot \sin 1\right) + \cos \left(\sqrt{x}\right)$

# Reproduce

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