Average Error: 18.4 → 18.5
Time: 13.9s
Precision: 64
$\sin \left(\frac{\sqrt{1 + x}}{\cos x}\right)$
$\sin \left(\frac{\sqrt{\left(\sqrt[3]{\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}} \cdot \sqrt[3]{\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}}\right) \cdot \left(\sqrt[3]{\sqrt[3]{1 + x}} \cdot \sqrt[3]{\sqrt[3]{1 + x}}\right)}}{\frac{\cos x}{\sqrt{\sqrt[3]{1 + x}}}}\right)$
\sin \left(\frac{\sqrt{1 + x}}{\cos x}\right)
\sin \left(\frac{\sqrt{\left(\sqrt[3]{\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}} \cdot \sqrt[3]{\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}}\right) \cdot \left(\sqrt[3]{\sqrt[3]{1 + x}} \cdot \sqrt[3]{\sqrt[3]{1 + x}}\right)}}{\frac{\cos x}{\sqrt{\sqrt[3]{1 + x}}}}\right)
double f(double x) {
double r1169848 = 1.0;
double r1169849 = x;
double r1169850 = r1169848 + r1169849;
double r1169851 = sqrt(r1169850);
double r1169852 = cos(r1169849);
double r1169853 = r1169851 / r1169852;
double r1169854 = sin(r1169853);
return r1169854;
}


double f(double x) {
double r1169855 = 1.0;
double r1169856 = x;
double r1169857 = r1169855 + r1169856;
double r1169858 = cbrt(r1169857);
double r1169859 = r1169858 * r1169858;
double r1169860 = cbrt(r1169859);
double r1169861 = r1169860 * r1169860;
double r1169862 = cbrt(r1169858);
double r1169863 = r1169862 * r1169862;
double r1169864 = r1169861 * r1169863;
double r1169865 = sqrt(r1169864);
double r1169866 = cos(r1169856);
double r1169867 = sqrt(r1169858);
double r1169868 = r1169866 / r1169867;
double r1169869 = r1169865 / r1169868;
double r1169870 = sin(r1169869);
return r1169870;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 18.4

$\sin \left(\frac{\sqrt{1 + x}}{\cos x}\right)$
2. Using strategy rm

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

$\leadsto \sin \left(\frac{\color{blue}{\sqrt{\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}} \cdot \sqrt{\sqrt[3]{1 + x}}}}{\cos x}\right)$
5. Applied associate-/l*18.4

$\leadsto \sin \color{blue}{\left(\frac{\sqrt{\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}}}{\frac{\cos x}{\sqrt{\sqrt[3]{1 + x}}}}\right)}$
6. Using strategy rm

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

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

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

$\leadsto \sin \left(\frac{\sqrt{\color{blue}{\left(\sqrt[3]{\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}} \cdot \sqrt[3]{\sqrt[3]{1 + x}}\right)} \cdot \left(\sqrt[3]{\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}} \cdot \sqrt[3]{\sqrt[3]{1 + x}}\right)}}{\frac{\cos x}{\sqrt{\sqrt[3]{1 + x}}}}\right)$
11. Applied swap-sqr18.5

$\leadsto \sin \left(\frac{\sqrt{\color{blue}{\left(\sqrt[3]{\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}} \cdot \sqrt[3]{\sqrt[3]{1 + x} \cdot \sqrt[3]{1 + x}}\right) \cdot \left(\sqrt[3]{\sqrt[3]{1 + x}} \cdot \sqrt[3]{\sqrt[3]{1 + x}}\right)}}}{\frac{\cos x}{\sqrt{\sqrt[3]{1 + x}}}}\right)$
12. Final simplification18.5

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

# Reproduce

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