Average Error: 15.5 → 15.0
Time: 59.3s
Precision: 64
\[1 - \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{\frac{\frac{\frac{1}{64} - \left(\frac{\frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}\right) \cdot \left(\frac{\frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}\right)}{\frac{1}{8} - \frac{\frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}}}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]
1 - \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}
\frac{\frac{\frac{\frac{1}{64} - \left(\frac{\frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}\right) \cdot \left(\frac{\frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}\right)}{\frac{1}{8} - \frac{\frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}}}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}
double f(double x) {
        double r37999613 = 1.0;
        double r37999614 = 0.5;
        double r37999615 = x;
        double r37999616 = hypot(r37999613, r37999615);
        double r37999617 = r37999613 / r37999616;
        double r37999618 = r37999613 + r37999617;
        double r37999619 = r37999614 * r37999618;
        double r37999620 = sqrt(r37999619);
        double r37999621 = r37999613 - r37999620;
        return r37999621;
}

double f(double x) {
        double r37999622 = 0.015625;
        double r37999623 = 1.0;
        double r37999624 = x;
        double r37999625 = hypot(r37999623, r37999624);
        double r37999626 = r37999623 / r37999625;
        double r37999627 = cbrt(r37999625);
        double r37999628 = r37999626 / r37999627;
        double r37999629 = r37999628 / r37999627;
        double r37999630 = -0.125;
        double r37999631 = r37999630 / r37999627;
        double r37999632 = r37999631 / r37999625;
        double r37999633 = r37999629 * r37999632;
        double r37999634 = r37999633 * r37999633;
        double r37999635 = r37999622 - r37999634;
        double r37999636 = 0.125;
        double r37999637 = r37999636 - r37999633;
        double r37999638 = r37999635 / r37999637;
        double r37999639 = 0.25;
        double r37999640 = r37999639 / r37999625;
        double r37999641 = r37999639 + r37999640;
        double r37999642 = r37999641 / r37999625;
        double r37999643 = r37999639 + r37999642;
        double r37999644 = r37999638 / r37999643;
        double r37999645 = 0.5;
        double r37999646 = r37999645 / r37999625;
        double r37999647 = r37999646 + r37999645;
        double r37999648 = sqrt(r37999647);
        double r37999649 = r37999623 + r37999648;
        double r37999650 = r37999644 / r37999649;
        return r37999650;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.5

    \[1 - \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
  2. Simplified15.5

    \[\leadsto \color{blue}{1 - \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]
  3. Using strategy rm
  4. Applied flip--15.5

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

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

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

    \[\leadsto \frac{\frac{\color{blue}{\frac{1}{8} + \frac{\frac{\frac{\frac{-1}{8}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}{\frac{1}{2} \cdot \frac{1}{2} + \left(\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2} \cdot \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}\right)}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]
  9. Simplified15.0

    \[\leadsto \frac{\frac{\frac{1}{8} + \frac{\frac{\frac{\frac{-1}{8}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}{\color{blue}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]
  10. Using strategy rm
  11. Applied add-cube-cbrt15.0

    \[\leadsto \frac{\frac{\frac{1}{8} + \frac{\frac{\frac{\frac{-1}{8}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}{\color{blue}{\left(\sqrt[3]{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]
  12. Applied add-cube-cbrt15.0

    \[\leadsto \frac{\frac{\frac{1}{8} + \frac{\frac{\frac{\frac{-1}{8}}{\mathsf{hypot}\left(1, x\right)}}{\color{blue}{\left(\sqrt[3]{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}}{\left(\sqrt[3]{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]
  13. Applied div-inv15.0

    \[\leadsto \frac{\frac{\frac{1}{8} + \frac{\frac{\color{blue}{\frac{-1}{8} \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}}}{\left(\sqrt[3]{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\left(\sqrt[3]{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]
  14. Applied times-frac15.0

    \[\leadsto \frac{\frac{\frac{1}{8} + \frac{\color{blue}{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}}{\left(\sqrt[3]{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}\right) \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]
  15. Applied times-frac15.0

    \[\leadsto \frac{\frac{\frac{1}{8} + \color{blue}{\frac{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]
  16. Simplified15.0

    \[\leadsto \frac{\frac{\frac{1}{8} + \color{blue}{\frac{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]
  17. Using strategy rm
  18. Applied flip-+15.0

    \[\leadsto \frac{\frac{\color{blue}{\frac{\frac{1}{8} \cdot \frac{1}{8} - \left(\frac{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}\right) \cdot \left(\frac{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}\right)}{\frac{1}{8} - \frac{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}}}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]
  19. Final simplification15.0

    \[\leadsto \frac{\frac{\frac{\frac{1}{64} - \left(\frac{\frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}\right) \cdot \left(\frac{\frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}\right)}{\frac{1}{8} - \frac{\frac{\frac{1}{\mathsf{hypot}\left(1, x\right)}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{-1}{8}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}}}{\frac{1}{4} + \frac{\frac{1}{4} + \frac{\frac{1}{4}}{\mathsf{hypot}\left(1, x\right)}}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}\]

Reproduce

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