Average Error: 10.9 → 0.0
Time: 11.7s
Precision: 64
\[\sqrt{\sqrt{x + 1}} + \sqrt{x \cdot x}\]
\[\left|x\right| + \sqrt{\sqrt{x + 1}}\]
\sqrt{\sqrt{x + 1}} + \sqrt{x \cdot x}
\left|x\right| + \sqrt{\sqrt{x + 1}}
double f(double x) {
        double r1826230 = x;
        double r1826231 = 1.0;
        double r1826232 = r1826230 + r1826231;
        double r1826233 = sqrt(r1826232);
        double r1826234 = sqrt(r1826233);
        double r1826235 = r1826230 * r1826230;
        double r1826236 = sqrt(r1826235);
        double r1826237 = r1826234 + r1826236;
        return r1826237;
}

double f(double x) {
        double r1826238 = x;
        double r1826239 = fabs(r1826238);
        double r1826240 = 1.0;
        double r1826241 = r1826238 + r1826240;
        double r1826242 = sqrt(r1826241);
        double r1826243 = sqrt(r1826242);
        double r1826244 = r1826239 + r1826243;
        return r1826244;
}

Error

Bits error versus x

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 10.9

    \[\sqrt{\sqrt{x + 1}} + \sqrt{x \cdot x}\]
  2. Simplified0.0

    \[\leadsto \color{blue}{\left|x\right| + \sqrt{\sqrt{x + 1}}}\]
  3. Final simplification0.0

    \[\leadsto \left|x\right| + \sqrt{\sqrt{x + 1}}\]

Reproduce

herbie shell --seed 1 
(FPCore (x)
  :name "sqrt(sqrt(x+1)) + sqrt(x*x)"
  :precision binary64
  (+ (sqrt (sqrt (+ x 1))) (sqrt (* x x))))