Average Error: 59.9 → 0.3
Time: 31.4s
Precision: 64
\[-0.0259999999999999988065102485279567190446 \lt x \land x \lt 0.0259999999999999988065102485279567190446\]
\[\frac{1}{x} - \frac{1}{\tan x}\]
\[\mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, \frac{x}{\sqrt{\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}} \cdot \frac{\frac{\mathsf{fma}\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right), \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right), \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395\right) \cdot 0.3333333333333333148296162562473909929395\right)}{\sqrt{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}}{\left|\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}\right|}\right)\]
\frac{1}{x} - \frac{1}{\tan x}
\mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, \frac{x}{\sqrt{\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}} \cdot \frac{\frac{\mathsf{fma}\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right), \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right), \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395\right) \cdot 0.3333333333333333148296162562473909929395\right)}{\sqrt{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}}{\left|\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}\right|}\right)
double f(double x) {
        double r9828078 = 1.0;
        double r9828079 = x;
        double r9828080 = r9828078 / r9828079;
        double r9828081 = tan(r9828079);
        double r9828082 = r9828078 / r9828081;
        double r9828083 = r9828080 - r9828082;
        return r9828083;
}

double f(double x) {
        double r9828084 = 0.0021164021164021165;
        double r9828085 = x;
        double r9828086 = 5.0;
        double r9828087 = pow(r9828085, r9828086);
        double r9828088 = 0.022222222222222223;
        double r9828089 = r9828085 * r9828085;
        double r9828090 = r9828088 * r9828089;
        double r9828091 = r9828090 * r9828090;
        double r9828092 = 0.3333333333333333;
        double r9828093 = r9828092 * r9828092;
        double r9828094 = r9828090 * r9828092;
        double r9828095 = r9828093 - r9828094;
        double r9828096 = r9828091 + r9828095;
        double r9828097 = cbrt(r9828096);
        double r9828098 = sqrt(r9828097);
        double r9828099 = r9828085 / r9828098;
        double r9828100 = r9828093 * r9828092;
        double r9828101 = fma(r9828090, r9828091, r9828100);
        double r9828102 = sqrt(r9828096);
        double r9828103 = r9828101 / r9828102;
        double r9828104 = fabs(r9828097);
        double r9828105 = r9828103 / r9828104;
        double r9828106 = r9828099 * r9828105;
        double r9828107 = fma(r9828084, r9828087, r9828106);
        return r9828107;
}

Error

Bits error versus x

Target

Original59.9
Target0.1
Herbie0.3
\[\begin{array}{l} \mathbf{if}\;\left|x\right| \lt 0.0259999999999999988065102485279567190446:\\ \;\;\;\;\frac{x}{3} \cdot \left(1 + \frac{x \cdot x}{15}\right)\\ \mathbf{else}:\\ \;\;\;\;\frac{1}{x} - \frac{1}{\tan x}\\ \end{array}\]

Derivation

  1. Initial program 59.9

    \[\frac{1}{x} - \frac{1}{\tan x}\]
  2. Taylor expanded around 0 0.3

    \[\leadsto \color{blue}{0.3333333333333333148296162562473909929395 \cdot x + \left(0.02222222222222222307030925492199457949027 \cdot {x}^{3} + 0.002116402116402116544841005563171165704262 \cdot {x}^{5}\right)}\]
  3. Simplified0.3

    \[\leadsto \color{blue}{\mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, x \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right) + 0.3333333333333333148296162562473909929395\right)\right)}\]
  4. Using strategy rm
  5. Applied flip3-+1.2

    \[\leadsto \mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, x \cdot \color{blue}{\frac{{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right)}^{3} + {0.3333333333333333148296162562473909929395}^{3}}{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}\right)\]
  6. Applied associate-*r/1.1

    \[\leadsto \mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, \color{blue}{\frac{x \cdot \left({\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right)}^{3} + {0.3333333333333333148296162562473909929395}^{3}\right)}{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}\right)\]
  7. Simplified0.3

    \[\leadsto \mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, \frac{\color{blue}{\mathsf{fma}\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right), \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right), \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395\right) \cdot 0.3333333333333333148296162562473909929395\right) \cdot x}}{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}\right)\]
  8. Using strategy rm
  9. Applied add-sqr-sqrt0.3

    \[\leadsto \mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, \frac{\mathsf{fma}\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right), \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right), \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395\right) \cdot 0.3333333333333333148296162562473909929395\right) \cdot x}{\color{blue}{\sqrt{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)} \cdot \sqrt{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}}\right)\]
  10. Applied times-frac0.2

    \[\leadsto \mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, \color{blue}{\frac{\mathsf{fma}\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right), \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right), \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395\right) \cdot 0.3333333333333333148296162562473909929395\right)}{\sqrt{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}} \cdot \frac{x}{\sqrt{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}}\right)\]
  11. Using strategy rm
  12. Applied add-cube-cbrt0.2

    \[\leadsto \mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, \frac{\mathsf{fma}\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right), \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right), \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395\right) \cdot 0.3333333333333333148296162562473909929395\right)}{\sqrt{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}} \cdot \frac{x}{\sqrt{\color{blue}{\left(\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)} \cdot \sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}\right) \cdot \sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}}}\right)\]
  13. Applied sqrt-prod0.2

    \[\leadsto \mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, \frac{\mathsf{fma}\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right), \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right), \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395\right) \cdot 0.3333333333333333148296162562473909929395\right)}{\sqrt{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}} \cdot \frac{x}{\color{blue}{\sqrt{\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)} \cdot \sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}} \cdot \sqrt{\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}}}\right)\]
  14. Applied *-un-lft-identity0.2

    \[\leadsto \mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, \frac{\mathsf{fma}\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right), \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right), \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395\right) \cdot 0.3333333333333333148296162562473909929395\right)}{\sqrt{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}} \cdot \frac{\color{blue}{1 \cdot x}}{\sqrt{\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)} \cdot \sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}} \cdot \sqrt{\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}}\right)\]
  15. Applied times-frac0.3

    \[\leadsto \mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, \frac{\mathsf{fma}\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right), \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right), \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395\right) \cdot 0.3333333333333333148296162562473909929395\right)}{\sqrt{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}} \cdot \color{blue}{\left(\frac{1}{\sqrt{\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)} \cdot \sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}} \cdot \frac{x}{\sqrt{\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}}\right)}\right)\]
  16. Applied associate-*r*0.3

    \[\leadsto \mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, \color{blue}{\left(\frac{\mathsf{fma}\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right), \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right), \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395\right) \cdot 0.3333333333333333148296162562473909929395\right)}{\sqrt{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}} \cdot \frac{1}{\sqrt{\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)} \cdot \sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}}\right) \cdot \frac{x}{\sqrt{\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}}}\right)\]
  17. Simplified0.3

    \[\leadsto \mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, \color{blue}{\frac{\frac{\mathsf{fma}\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right), \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right), \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395\right) \cdot 0.3333333333333333148296162562473909929395\right)}{\sqrt{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}} \cdot 1}{\left|\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}\right|}} \cdot \frac{x}{\sqrt{\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}}\right)\]
  18. Final simplification0.3

    \[\leadsto \mathsf{fma}\left(0.002116402116402116544841005563171165704262, {x}^{5}, \frac{x}{\sqrt{\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}} \cdot \frac{\frac{\mathsf{fma}\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right), \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right), \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395\right) \cdot 0.3333333333333333148296162562473909929395\right)}{\sqrt{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}}}{\left|\sqrt[3]{\left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) + \left(0.3333333333333333148296162562473909929395 \cdot 0.3333333333333333148296162562473909929395 - \left(0.02222222222222222307030925492199457949027 \cdot \left(x \cdot x\right)\right) \cdot 0.3333333333333333148296162562473909929395\right)}\right|}\right)\]

Reproduce

herbie shell --seed 2019173 +o rules:numerics
(FPCore (x)
  :name "invcot (example 3.9)"
  :pre (and (< -0.026 x) (< x 0.026))

  :herbie-target
  (if (< (fabs x) 0.026) (* (/ x 3.0) (+ 1.0 (/ (* x x) 15.0))) (- (/ 1.0 x) (/ 1.0 (tan x))))

  (- (/ 1.0 x) (/ 1.0 (tan x))))