Average Error: 0.0 → 0.0
Time: 3.8s
Precision: 64
\[x \cdot x + y \cdot y\]
\[\sqrt{x \cdot x + y \cdot y} \cdot \sqrt{x \cdot x + y \cdot y}\]
x \cdot x + y \cdot y
\sqrt{x \cdot x + y \cdot y} \cdot \sqrt{x \cdot x + y \cdot y}
double f(double x, double y) {
        double r167303 = x;
        double r167304 = r167303 * r167303;
        double r167305 = y;
        double r167306 = r167305 * r167305;
        double r167307 = r167304 + r167306;
        return r167307;
}

double f(double x, double y) {
        double r167308 = x;
        double r167309 = r167308 * r167308;
        double r167310 = y;
        double r167311 = r167310 * r167310;
        double r167312 = r167309 + r167311;
        double r167313 = sqrt(r167312);
        double r167314 = r167313 * r167313;
        return r167314;
}

Error

Bits error versus x

Bits error versus y

Try it out

Your Program's Arguments

Results

Enter valid numbers for all inputs

Derivation

  1. Initial program 0.0

    \[x \cdot x + y \cdot y\]
  2. Using strategy rm
  3. Applied add-sqr-sqrt0.0

    \[\leadsto \color{blue}{\sqrt{x \cdot x + y \cdot y} \cdot \sqrt{x \cdot x + y \cdot y}}\]
  4. Final simplification0.0

    \[\leadsto \sqrt{x \cdot x + y \cdot y} \cdot \sqrt{x \cdot x + y \cdot y}\]

Reproduce

herbie shell --seed 2019350 
(FPCore (x y)
  :name "Graphics.Rasterific.Linear:$cquadrance from Rasterific-0.6.1"
  :precision binary64
  (+ (* x x) (* y y)))