Average Error: 1.5 → 0.1
Time: 16.6s
Precision: 64
$\frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{2 \cdot \sin \left(\cos^{-1} \left(\frac{x - 1}{2}\right)\right)}$
$\frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{\sqrt{1 - \left(\frac{x - 1}{\sqrt[3]{2}} \cdot \frac{x - 1}{\sqrt[3]{2}}\right) \cdot \left(\frac{1}{\sqrt[3]{2} \cdot \sqrt[3]{2}} \cdot \frac{1}{\sqrt[3]{2} \cdot \sqrt[3]{2}}\right)} \cdot 2}$
\frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{2 \cdot \sin \left(\cos^{-1} \left(\frac{x - 1}{2}\right)\right)}
\frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{\sqrt{1 - \left(\frac{x - 1}{\sqrt[3]{2}} \cdot \frac{x - 1}{\sqrt[3]{2}}\right) \cdot \left(\frac{1}{\sqrt[3]{2} \cdot \sqrt[3]{2}} \cdot \frac{1}{\sqrt[3]{2} \cdot \sqrt[3]{2}}\right)} \cdot 2}
double f(double x) {
double r14039730 = x;
double r14039731 = 1.0;
double r14039732 = r14039730 - r14039731;
double r14039733 = 2.0;
double r14039734 = r14039732 / r14039733;
double r14039735 = acos(r14039734);
double r14039736 = sin(r14039735);
double r14039737 = r14039733 * r14039736;
double r14039738 = r14039735 / r14039737;
return r14039738;
}


double f(double x) {
double r14039739 = x;
double r14039740 = 1.0;
double r14039741 = r14039739 - r14039740;
double r14039742 = 2.0;
double r14039743 = r14039741 / r14039742;
double r14039744 = acos(r14039743);
double r14039745 = cbrt(r14039742);
double r14039746 = r14039741 / r14039745;
double r14039747 = r14039746 * r14039746;
double r14039748 = r14039745 * r14039745;
double r14039749 = r14039740 / r14039748;
double r14039750 = r14039749 * r14039749;
double r14039751 = r14039747 * r14039750;
double r14039752 = r14039740 - r14039751;
double r14039753 = sqrt(r14039752);
double r14039754 = r14039753 * r14039742;
double r14039755 = r14039744 / r14039754;
return r14039755;
}



# Try it out

Results

 In Out
Enter valid numbers for all inputs

# Derivation

1. Initial program 1.5

$\frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{2 \cdot \sin \left(\cos^{-1} \left(\frac{x - 1}{2}\right)\right)}$
2. Using strategy rm
3. Applied sin-acos1.0

$\leadsto \frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{2 \cdot \color{blue}{\sqrt{1 - \frac{x - 1}{2} \cdot \frac{x - 1}{2}}}}$
4. Using strategy rm

$\leadsto \frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{2 \cdot \sqrt{1 - \frac{x - 1}{2} \cdot \frac{x - 1}{\color{blue}{\left(\sqrt[3]{2} \cdot \sqrt[3]{2}\right) \cdot \sqrt[3]{2}}}}}$
6. Applied *-un-lft-identity1.0

$\leadsto \frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{2 \cdot \sqrt{1 - \frac{x - 1}{2} \cdot \frac{x - \color{blue}{1 \cdot 1}}{\left(\sqrt[3]{2} \cdot \sqrt[3]{2}\right) \cdot \sqrt[3]{2}}}}$
7. Applied *-un-lft-identity1.0

$\leadsto \frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{2 \cdot \sqrt{1 - \frac{x - 1}{2} \cdot \frac{\color{blue}{1 \cdot x} - 1 \cdot 1}{\left(\sqrt[3]{2} \cdot \sqrt[3]{2}\right) \cdot \sqrt[3]{2}}}}$
8. Applied distribute-lft-out--1.0

$\leadsto \frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{2 \cdot \sqrt{1 - \frac{x - 1}{2} \cdot \frac{\color{blue}{1 \cdot \left(x - 1\right)}}{\left(\sqrt[3]{2} \cdot \sqrt[3]{2}\right) \cdot \sqrt[3]{2}}}}$
9. Applied times-frac1.0

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

$\leadsto \frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{2 \cdot \sqrt{1 - \frac{x - 1}{\color{blue}{\left(\sqrt[3]{2} \cdot \sqrt[3]{2}\right) \cdot \sqrt[3]{2}}} \cdot \left(\frac{1}{\sqrt[3]{2} \cdot \sqrt[3]{2}} \cdot \frac{x - 1}{\sqrt[3]{2}}\right)}}$
11. Applied *-un-lft-identity0.0

$\leadsto \frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{2 \cdot \sqrt{1 - \frac{x - \color{blue}{1 \cdot 1}}{\left(\sqrt[3]{2} \cdot \sqrt[3]{2}\right) \cdot \sqrt[3]{2}} \cdot \left(\frac{1}{\sqrt[3]{2} \cdot \sqrt[3]{2}} \cdot \frac{x - 1}{\sqrt[3]{2}}\right)}}$
12. Applied *-un-lft-identity0.0

$\leadsto \frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{2 \cdot \sqrt{1 - \frac{\color{blue}{1 \cdot x} - 1 \cdot 1}{\left(\sqrt[3]{2} \cdot \sqrt[3]{2}\right) \cdot \sqrt[3]{2}} \cdot \left(\frac{1}{\sqrt[3]{2} \cdot \sqrt[3]{2}} \cdot \frac{x - 1}{\sqrt[3]{2}}\right)}}$
13. Applied distribute-lft-out--0.0

$\leadsto \frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{2 \cdot \sqrt{1 - \frac{\color{blue}{1 \cdot \left(x - 1\right)}}{\left(\sqrt[3]{2} \cdot \sqrt[3]{2}\right) \cdot \sqrt[3]{2}} \cdot \left(\frac{1}{\sqrt[3]{2} \cdot \sqrt[3]{2}} \cdot \frac{x - 1}{\sqrt[3]{2}}\right)}}$
14. Applied times-frac0.1

$\leadsto \frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{2 \cdot \sqrt{1 - \color{blue}{\left(\frac{1}{\sqrt[3]{2} \cdot \sqrt[3]{2}} \cdot \frac{x - 1}{\sqrt[3]{2}}\right)} \cdot \left(\frac{1}{\sqrt[3]{2} \cdot \sqrt[3]{2}} \cdot \frac{x - 1}{\sqrt[3]{2}}\right)}}$
15. Applied swap-sqr0.1

$\leadsto \frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{2 \cdot \sqrt{1 - \color{blue}{\left(\frac{1}{\sqrt[3]{2} \cdot \sqrt[3]{2}} \cdot \frac{1}{\sqrt[3]{2} \cdot \sqrt[3]{2}}\right) \cdot \left(\frac{x - 1}{\sqrt[3]{2}} \cdot \frac{x - 1}{\sqrt[3]{2}}\right)}}}$
16. Final simplification0.1

$\leadsto \frac{\cos^{-1} \left(\frac{x - 1}{2}\right)}{\sqrt{1 - \left(\frac{x - 1}{\sqrt[3]{2}} \cdot \frac{x - 1}{\sqrt[3]{2}}\right) \cdot \left(\frac{1}{\sqrt[3]{2} \cdot \sqrt[3]{2}} \cdot \frac{1}{\sqrt[3]{2} \cdot \sqrt[3]{2}}\right)} \cdot 2}$

# Reproduce

herbie shell --seed 1
(FPCore (x)
:name "acos((x-1)/2)/(2*sin(acos((x-1)/2)))"
(/ (acos (/ (- x 1) 2)) (* 2 (sin (acos (/ (- x 1) 2))))))