Average Error: 15.1 → 14.8
Time: 14.6s
Precision: 64
\[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{\frac{\left(\left({1}^{3} - {0.5}^{3}\right) \cdot 1\right) \cdot \mathsf{hypot}\left(1, x\right) - \left(\left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right) \cdot 1\right) \cdot 0.5}{\frac{\left({\left(0.5 \cdot \left(0.5 + 1\right)\right)}^{3} + {1}^{6}\right) \cdot \mathsf{hypot}\left(1, x\right)}{\left(\left(0.5 \cdot \left(0.5 + 1\right)\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right)\right) - \left(1 \cdot 1\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right)\right)\right) + \left(1 \cdot 1\right) \cdot \left(1 \cdot 1\right)}}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}
\frac{\frac{\left(\left({1}^{3} - {0.5}^{3}\right) \cdot 1\right) \cdot \mathsf{hypot}\left(1, x\right) - \left(\left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right) \cdot 1\right) \cdot 0.5}{\frac{\left({\left(0.5 \cdot \left(0.5 + 1\right)\right)}^{3} + {1}^{6}\right) \cdot \mathsf{hypot}\left(1, x\right)}{\left(\left(0.5 \cdot \left(0.5 + 1\right)\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right)\right) - \left(1 \cdot 1\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right)\right)\right) + \left(1 \cdot 1\right) \cdot \left(1 \cdot 1\right)}}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}
double f(double x) {
        double r133101 = 1.0;
        double r133102 = 0.5;
        double r133103 = x;
        double r133104 = hypot(r133101, r133103);
        double r133105 = r133101 / r133104;
        double r133106 = r133101 + r133105;
        double r133107 = r133102 * r133106;
        double r133108 = sqrt(r133107);
        double r133109 = r133101 - r133108;
        return r133109;
}

double f(double x) {
        double r133110 = 1.0;
        double r133111 = 3.0;
        double r133112 = pow(r133110, r133111);
        double r133113 = 0.5;
        double r133114 = pow(r133113, r133111);
        double r133115 = r133112 - r133114;
        double r133116 = r133115 * r133110;
        double r133117 = x;
        double r133118 = hypot(r133110, r133117);
        double r133119 = r133116 * r133118;
        double r133120 = r133113 + r133110;
        double r133121 = r133113 * r133120;
        double r133122 = r133110 * r133110;
        double r133123 = r133121 + r133122;
        double r133124 = r133123 * r133110;
        double r133125 = r133124 * r133113;
        double r133126 = r133119 - r133125;
        double r133127 = pow(r133121, r133111);
        double r133128 = 6.0;
        double r133129 = pow(r133110, r133128);
        double r133130 = r133127 + r133129;
        double r133131 = r133130 * r133118;
        double r133132 = r133121 * r133121;
        double r133133 = r133122 * r133121;
        double r133134 = r133132 - r133133;
        double r133135 = r133122 * r133122;
        double r133136 = r133134 + r133135;
        double r133137 = r133131 / r133136;
        double r133138 = r133126 / r133137;
        double r133139 = r133110 / r133118;
        double r133140 = r133110 + r133139;
        double r133141 = r133113 * r133140;
        double r133142 = sqrt(r133141);
        double r133143 = r133110 + r133142;
        double r133144 = r133138 / r133143;
        return r133144;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.1

    \[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
  2. Using strategy rm
  3. Applied flip--15.1

    \[\leadsto \color{blue}{\frac{1 \cdot 1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)} \cdot \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}}\]
  4. Simplified14.6

    \[\leadsto \frac{\color{blue}{1 \cdot \left(1 - 0.5\right) - \frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  5. Simplified14.6

    \[\leadsto \frac{1 \cdot \left(1 - 0.5\right) - \frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)}}{\color{blue}{1 + \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)}}}\]
  6. Using strategy rm
  7. Applied flip3--14.6

    \[\leadsto \frac{1 \cdot \color{blue}{\frac{{1}^{3} - {0.5}^{3}}{1 \cdot 1 + \left(0.5 \cdot 0.5 + 1 \cdot 0.5\right)}} - \frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)}}{1 + \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)}}\]
  8. Applied associate-*r/14.6

    \[\leadsto \frac{\color{blue}{\frac{1 \cdot \left({1}^{3} - {0.5}^{3}\right)}{1 \cdot 1 + \left(0.5 \cdot 0.5 + 1 \cdot 0.5\right)}} - \frac{0.5 \cdot 1}{\mathsf{hypot}\left(1, x\right)}}{1 + \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)}}\]
  9. Applied frac-sub14.6

    \[\leadsto \frac{\color{blue}{\frac{\left(1 \cdot \left({1}^{3} - {0.5}^{3}\right)\right) \cdot \mathsf{hypot}\left(1, x\right) - \left(1 \cdot 1 + \left(0.5 \cdot 0.5 + 1 \cdot 0.5\right)\right) \cdot \left(0.5 \cdot 1\right)}{\left(1 \cdot 1 + \left(0.5 \cdot 0.5 + 1 \cdot 0.5\right)\right) \cdot \mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)}}\]
  10. Simplified14.6

    \[\leadsto \frac{\frac{\color{blue}{\left(\left({1}^{3} - {0.5}^{3}\right) \cdot 1\right) \cdot \mathsf{hypot}\left(1, x\right) - \left(\left(1 \cdot 1 + 0.5 \cdot \left(0.5 + 1\right)\right) \cdot 1\right) \cdot 0.5}}{\left(1 \cdot 1 + \left(0.5 \cdot 0.5 + 1 \cdot 0.5\right)\right) \cdot \mathsf{hypot}\left(1, x\right)}}{1 + \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)}}\]
  11. Simplified14.6

    \[\leadsto \frac{\frac{\left(\left({1}^{3} - {0.5}^{3}\right) \cdot 1\right) \cdot \mathsf{hypot}\left(1, x\right) - \left(\left(1 \cdot 1 + 0.5 \cdot \left(0.5 + 1\right)\right) \cdot 1\right) \cdot 0.5}{\color{blue}{\mathsf{hypot}\left(1, x\right) \cdot \left(1 \cdot 1 + 0.5 \cdot \left(0.5 + 1\right)\right)}}}{1 + \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)}}\]
  12. Using strategy rm
  13. Applied flip3-+14.6

    \[\leadsto \frac{\frac{\left(\left({1}^{3} - {0.5}^{3}\right) \cdot 1\right) \cdot \mathsf{hypot}\left(1, x\right) - \left(\left(1 \cdot 1 + 0.5 \cdot \left(0.5 + 1\right)\right) \cdot 1\right) \cdot 0.5}{\mathsf{hypot}\left(1, x\right) \cdot \color{blue}{\frac{{\left(1 \cdot 1\right)}^{3} + {\left(0.5 \cdot \left(0.5 + 1\right)\right)}^{3}}{\left(1 \cdot 1\right) \cdot \left(1 \cdot 1\right) + \left(\left(0.5 \cdot \left(0.5 + 1\right)\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right)\right) - \left(1 \cdot 1\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right)\right)\right)}}}}{1 + \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)}}\]
  14. Applied associate-*r/14.8

    \[\leadsto \frac{\frac{\left(\left({1}^{3} - {0.5}^{3}\right) \cdot 1\right) \cdot \mathsf{hypot}\left(1, x\right) - \left(\left(1 \cdot 1 + 0.5 \cdot \left(0.5 + 1\right)\right) \cdot 1\right) \cdot 0.5}{\color{blue}{\frac{\mathsf{hypot}\left(1, x\right) \cdot \left({\left(1 \cdot 1\right)}^{3} + {\left(0.5 \cdot \left(0.5 + 1\right)\right)}^{3}\right)}{\left(1 \cdot 1\right) \cdot \left(1 \cdot 1\right) + \left(\left(0.5 \cdot \left(0.5 + 1\right)\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right)\right) - \left(1 \cdot 1\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right)\right)\right)}}}}{1 + \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)}}\]
  15. Simplified14.8

    \[\leadsto \frac{\frac{\left(\left({1}^{3} - {0.5}^{3}\right) \cdot 1\right) \cdot \mathsf{hypot}\left(1, x\right) - \left(\left(1 \cdot 1 + 0.5 \cdot \left(0.5 + 1\right)\right) \cdot 1\right) \cdot 0.5}{\frac{\color{blue}{\left({\left(\left(0.5 + 1\right) \cdot 0.5\right)}^{3} + {1}^{6}\right) \cdot \mathsf{hypot}\left(1, x\right)}}{\left(1 \cdot 1\right) \cdot \left(1 \cdot 1\right) + \left(\left(0.5 \cdot \left(0.5 + 1\right)\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right)\right) - \left(1 \cdot 1\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right)\right)\right)}}}{1 + \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)}}\]
  16. Final simplification14.8

    \[\leadsto \frac{\frac{\left(\left({1}^{3} - {0.5}^{3}\right) \cdot 1\right) \cdot \mathsf{hypot}\left(1, x\right) - \left(\left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right) \cdot 1\right) \cdot 0.5}{\frac{\left({\left(0.5 \cdot \left(0.5 + 1\right)\right)}^{3} + {1}^{6}\right) \cdot \mathsf{hypot}\left(1, x\right)}{\left(\left(0.5 \cdot \left(0.5 + 1\right)\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right)\right) - \left(1 \cdot 1\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right)\right)\right) + \left(1 \cdot 1\right) \cdot \left(1 \cdot 1\right)}}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]

Reproduce

herbie shell --seed 2019174 
(FPCore (x)
  :name "Given's Rotation SVD example, simplified"
  (- 1.0 (sqrt (* 0.5 (+ 1.0 (/ 1.0 (hypot 1.0 x)))))))