Average Error: 0.0 → 0.0
Time: 550.0ms
Precision: 64
\[x \cdot x + y \cdot y\]
\[x \cdot x + y \cdot y\]
x \cdot x + y \cdot y
x \cdot x + y \cdot y
double f(double x, double y) {
        double r190597 = x;
        double r190598 = r190597 * r190597;
        double r190599 = y;
        double r190600 = r190599 * r190599;
        double r190601 = r190598 + r190600;
        return r190601;
}

double f(double x, double y) {
        double r190602 = x;
        double r190603 = r190602 * r190602;
        double r190604 = y;
        double r190605 = r190604 * r190604;
        double r190606 = r190603 + r190605;
        return r190606;
}

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. Final simplification0.0

    \[\leadsto x \cdot x + y \cdot y\]

Reproduce

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