Average Error: 15.2 → 14.7
Time: 15.3s
Precision: 64
\[1 - \sqrt{\frac{1}{2} \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{\frac{\sqrt{\frac{1}{4} - \frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}} \cdot \sqrt{\frac{1}{4} - \frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\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{\frac{1}{4} - \frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}} \cdot \sqrt{\frac{1}{4} - \frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\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 r3208029 = 1.0;
        double r3208030 = 0.5;
        double r3208031 = x;
        double r3208032 = hypot(r3208029, r3208031);
        double r3208033 = r3208029 / r3208032;
        double r3208034 = r3208029 + r3208033;
        double r3208035 = r3208030 * r3208034;
        double r3208036 = sqrt(r3208035);
        double r3208037 = r3208029 - r3208036;
        return r3208037;
}

double f(double x) {
        double r3208038 = 0.25;
        double r3208039 = 0.5;
        double r3208040 = 1.0;
        double r3208041 = x;
        double r3208042 = hypot(r3208040, r3208041);
        double r3208043 = cbrt(r3208042);
        double r3208044 = r3208039 / r3208043;
        double r3208045 = r3208044 / r3208043;
        double r3208046 = r3208045 / r3208042;
        double r3208047 = r3208044 * r3208046;
        double r3208048 = r3208038 - r3208047;
        double r3208049 = sqrt(r3208048);
        double r3208050 = r3208049 * r3208049;
        double r3208051 = r3208039 / r3208042;
        double r3208052 = r3208051 + r3208039;
        double r3208053 = r3208050 / r3208052;
        double r3208054 = sqrt(r3208052);
        double r3208055 = r3208054 + r3208040;
        double r3208056 = r3208053 / r3208055;
        return r3208056;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 15.2

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

    \[\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.2

    \[\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. Simplified14.7

    \[\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 flip--14.7

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

    \[\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}}{\mathsf{hypot}\left(1, x\right)}}{\color{blue}{\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}}}\]
  9. Using strategy rm
  10. Applied add-cube-cbrt14.7

    \[\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}{\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{\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}}}\]
  11. Applied *-un-lft-identity14.7

    \[\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}}}{\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{\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}}}\]
  12. Applied times-frac14.7

    \[\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[3]{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}\right)}}{\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}}}\]
  13. Applied associate-*r*14.7

    \[\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[3]{\mathsf{hypot}\left(1, x\right)} \cdot \sqrt[3]{\mathsf{hypot}\left(1, x\right)}}\right) \cdot \frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}}{\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}}}\]
  14. Simplified14.7

    \[\leadsto \frac{\frac{\frac{1}{2} \cdot \frac{1}{2} - \color{blue}{\frac{\frac{\frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\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}}}\]
  15. Using strategy rm
  16. Applied add-sqr-sqrt14.7

    \[\leadsto \frac{\frac{\color{blue}{\sqrt{\frac{1}{2} \cdot \frac{1}{2} - \frac{\frac{\frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}} \cdot \sqrt{\frac{1}{2} \cdot \frac{1}{2} - \frac{\frac{\frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)} \cdot \frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}}}{\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}}}\]
  17. Final simplification14.7

    \[\leadsto \frac{\frac{\sqrt{\frac{1}{4} - \frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\right)}} \cdot \sqrt{\frac{1}{4} - \frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}} \cdot \frac{\frac{\frac{\frac{1}{2}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\sqrt[3]{\mathsf{hypot}\left(1, x\right)}}}{\mathsf{hypot}\left(1, x\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 2019130 
(FPCore (x)
  :name "Given's Rotation SVD example, simplified"
  (- 1 (sqrt (* 1/2 (+ 1 (/ 1 (hypot 1 x)))))))