Average Error: 15.4 → 15.0
Time: 5.2s
Precision: 64
\[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{\frac{1 \cdot \left(\left({1}^{3} - {0.5}^{3}\right) \cdot \mathsf{hypot}\left(1, x\right) - 0.5 \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)\right)}{\mathsf{hypot}\left(1, x\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)}}{1 + \frac{\sqrt{0.5 \cdot \left({1}^{3} + {\left(\frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}^{3}\right)}}{\sqrt{1 \cdot 1 + \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)} - 1 \cdot \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{1 \cdot \left(\left({1}^{3} - {0.5}^{3}\right) \cdot \mathsf{hypot}\left(1, x\right) - 0.5 \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)\right)}{\mathsf{hypot}\left(1, x\right) \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)}}{1 + \frac{\sqrt{0.5 \cdot \left({1}^{3} + {\left(\frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}^{3}\right)}}{\sqrt{1 \cdot 1 + \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)} - 1 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}}
double f(double x) {
        double r146519 = 1.0;
        double r146520 = 0.5;
        double r146521 = x;
        double r146522 = hypot(r146519, r146521);
        double r146523 = r146519 / r146522;
        double r146524 = r146519 + r146523;
        double r146525 = r146520 * r146524;
        double r146526 = sqrt(r146525);
        double r146527 = r146519 - r146526;
        return r146527;
}

double f(double x) {
        double r146528 = 1.0;
        double r146529 = 3.0;
        double r146530 = pow(r146528, r146529);
        double r146531 = 0.5;
        double r146532 = pow(r146531, r146529);
        double r146533 = r146530 - r146532;
        double r146534 = x;
        double r146535 = hypot(r146528, r146534);
        double r146536 = r146533 * r146535;
        double r146537 = r146531 + r146528;
        double r146538 = r146531 * r146537;
        double r146539 = r146528 * r146528;
        double r146540 = r146538 + r146539;
        double r146541 = r146531 * r146540;
        double r146542 = r146536 - r146541;
        double r146543 = r146528 * r146542;
        double r146544 = r146535 * r146540;
        double r146545 = r146543 / r146544;
        double r146546 = r146528 / r146535;
        double r146547 = pow(r146546, r146529);
        double r146548 = r146530 + r146547;
        double r146549 = r146531 * r146548;
        double r146550 = sqrt(r146549);
        double r146551 = r146546 * r146546;
        double r146552 = r146528 * r146546;
        double r146553 = r146551 - r146552;
        double r146554 = r146539 + r146553;
        double r146555 = sqrt(r146554);
        double r146556 = r146550 / r146555;
        double r146557 = r146528 + r146556;
        double r146558 = r146545 / r146557;
        return r146558;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.4

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

    \[\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. Simplified15.0

    \[\leadsto \frac{\color{blue}{1 \cdot \left(1 - 0.5\right) - 0.5 \cdot \frac{1}{\mathsf{hypot}\left(1, x\right)}}}{1 + \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  5. Using strategy rm
  6. Applied associate-*r/15.0

    \[\leadsto \frac{1 \cdot \left(1 - 0.5\right) - \color{blue}{\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)}}\]
  7. Applied flip3--15.0

    \[\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(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  8. Applied associate-*r/15.0

    \[\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(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  9. Applied frac-sub15.0

    \[\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(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  10. Simplified15.0

    \[\leadsto \frac{\frac{\color{blue}{1 \cdot \left(\left({1}^{3} - {0.5}^{3}\right) \cdot \mathsf{hypot}\left(1, x\right) - 0.5 \cdot \left(0.5 \cdot \left(0.5 + 1\right) + 1 \cdot 1\right)\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(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}}\]
  11. Simplified15.0

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

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

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

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

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

Reproduce

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