Average Error: 15.7 → 15.2
Time: 34.9s
Precision: 64
\[1 - \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{\frac{\sqrt[3]{\frac{1}{4} - \frac{\frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}} \cdot \left(\sqrt[3]{\frac{1}{4} - \frac{\frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}} \cdot \sqrt[3]{\frac{1}{4} - \frac{\frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}}\right)}{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}{\sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}} + 1}\]
1 - \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}
\frac{\frac{\sqrt[3]{\frac{1}{4} - \frac{\frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}} \cdot \left(\sqrt[3]{\frac{1}{4} - \frac{\frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}} \cdot \sqrt[3]{\frac{1}{4} - \frac{\frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}}\right)}{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}}}{\sqrt{\frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} + \frac{1}{2}} + 1}
double f(double x) {
        double r4139473 = 1.0;
        double r4139474 = 0.5;
        double r4139475 = x;
        double r4139476 = hypot(r4139473, r4139475);
        double r4139477 = r4139473 / r4139476;
        double r4139478 = r4139473 + r4139477;
        double r4139479 = r4139474 * r4139478;
        double r4139480 = sqrt(r4139479);
        double r4139481 = r4139473 - r4139480;
        return r4139481;
}

double f(double x) {
        double r4139482 = 0.25;
        double r4139483 = 0.5;
        double r4139484 = 1.0;
        double r4139485 = x;
        double r4139486 = hypot(r4139484, r4139485);
        double r4139487 = sqrt(r4139486);
        double r4139488 = r4139483 / r4139487;
        double r4139489 = r4139488 / r4139486;
        double r4139490 = r4139489 * r4139488;
        double r4139491 = r4139482 - r4139490;
        double r4139492 = cbrt(r4139491);
        double r4139493 = r4139492 * r4139492;
        double r4139494 = r4139492 * r4139493;
        double r4139495 = r4139483 / r4139486;
        double r4139496 = r4139495 + r4139483;
        double r4139497 = r4139494 / r4139496;
        double r4139498 = sqrt(r4139496);
        double r4139499 = r4139498 + r4139484;
        double r4139500 = r4139497 / r4139499;
        return r4139500;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.7

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

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

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

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

    \[\leadsto \frac{\color{blue}{\frac{\frac{1}{2} \cdot \frac{1}{2} - \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}}{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}}}}{1 + \sqrt{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}}}\]
  8. Using strategy rm
  9. Applied add-sqr-sqrt15.2

    \[\leadsto \frac{\frac{\frac{1}{2} \cdot \frac{1}{2} - \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{2}}{\color{blue}{\sqrt{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt{\mathsf{hypot}\left(1, x\right)}}}}{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}}}\]
  10. Applied *-un-lft-identity15.2

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

    \[\leadsto \frac{\frac{\frac{1}{2} \cdot \frac{1}{2} - \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)} \cdot \color{blue}{\left(\frac{1}{\sqrt{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}\right)}}{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}}}\]
  12. Applied associate-*r*15.2

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

    \[\leadsto \frac{\frac{\frac{1}{2} \cdot \frac{1}{2} - \color{blue}{\frac{\frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{1}{2}}{\sqrt{\mathsf{hypot}\left(1, x\right)}}}{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{\frac{1}{2} + \frac{\frac{1}{2}}{\mathsf{hypot}\left(1, x\right)}}}\]
  14. Using strategy rm
  15. Applied add-cube-cbrt15.2

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

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

Reproduce

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