Average Error: 15.1 → 14.6
Time: 33.5s
Precision: 64
\[1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\]
\[\frac{\sqrt[3]{\left(\left(1 \cdot 1\right) \cdot 1 - \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} \cdot \left(0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)\right)\right) \cdot \left(\log \left(e^{\left(1 \cdot 1\right) \cdot 1 - \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} \cdot \left(0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)\right)}\right) \cdot \left(\left(1 \cdot 1\right) \cdot 1 - \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} \cdot \left(0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)\right)\right)\right)}}{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right) + 1 \cdot \left(\sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} + 1\right)}\]
1 - \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}
\frac{\sqrt[3]{\left(\left(1 \cdot 1\right) \cdot 1 - \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} \cdot \left(0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)\right)\right) \cdot \left(\log \left(e^{\left(1 \cdot 1\right) \cdot 1 - \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} \cdot \left(0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)\right)}\right) \cdot \left(\left(1 \cdot 1\right) \cdot 1 - \sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} \cdot \left(0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)\right)\right)\right)}}{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right) + 1 \cdot \left(\sqrt{0.5 \cdot \left(\frac{1}{\mathsf{hypot}\left(1, x\right)} + 1\right)} + 1\right)}
double f(double x) {
        double r9231021 = 1.0;
        double r9231022 = 0.5;
        double r9231023 = x;
        double r9231024 = hypot(r9231021, r9231023);
        double r9231025 = r9231021 / r9231024;
        double r9231026 = r9231021 + r9231025;
        double r9231027 = r9231022 * r9231026;
        double r9231028 = sqrt(r9231027);
        double r9231029 = r9231021 - r9231028;
        return r9231029;
}

double f(double x) {
        double r9231030 = 1.0;
        double r9231031 = r9231030 * r9231030;
        double r9231032 = r9231031 * r9231030;
        double r9231033 = 0.5;
        double r9231034 = x;
        double r9231035 = hypot(r9231030, r9231034);
        double r9231036 = r9231030 / r9231035;
        double r9231037 = r9231036 + r9231030;
        double r9231038 = r9231033 * r9231037;
        double r9231039 = sqrt(r9231038);
        double r9231040 = r9231039 * r9231038;
        double r9231041 = r9231032 - r9231040;
        double r9231042 = exp(r9231041);
        double r9231043 = log(r9231042);
        double r9231044 = r9231043 * r9231041;
        double r9231045 = r9231041 * r9231044;
        double r9231046 = cbrt(r9231045);
        double r9231047 = r9231039 + r9231030;
        double r9231048 = r9231030 * r9231047;
        double r9231049 = r9231038 + r9231048;
        double r9231050 = r9231046 / r9231049;
        return r9231050;
}

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 flip3--15.3

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

    \[\leadsto \frac{\color{blue}{\left(1 \cdot 1\right) \cdot 1 - \left(\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5\right) \cdot \sqrt{\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5}}}{1 \cdot 1 + \left(\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 \cdot \sqrt{0.5 \cdot \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right)}\right)}\]
  5. Simplified14.6

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

    \[\leadsto \frac{\color{blue}{\sqrt[3]{\left(\left(\left(1 \cdot 1\right) \cdot 1 - \left(\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5\right) \cdot \sqrt{\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5}\right) \cdot \left(\left(1 \cdot 1\right) \cdot 1 - \left(\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5\right) \cdot \sqrt{\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5}\right)\right) \cdot \left(\left(1 \cdot 1\right) \cdot 1 - \left(\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5\right) \cdot \sqrt{\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5}\right)}}}{1 \cdot \left(\sqrt{\left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5} + 1\right) + \left(1 + \frac{1}{\mathsf{hypot}\left(1, x\right)}\right) \cdot 0.5}\]
  8. Using strategy rm
  9. Applied add-log-exp14.6

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

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

Reproduce

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