(FPCore (x y) :precision binary64 (+ (* x x) (* y y)))
(FPCore (x y) :precision binary64 (pow (hypot x y) 2.0))
double code(double x, double y) {
return (x * x) + (y * y);
}
double code(double x, double y) {
return pow(hypot(x, y), 2.0);
}
public static double code(double x, double y) {
return (x * x) + (y * y);
}
public static double code(double x, double y) {
return Math.pow(Math.hypot(x, y), 2.0);
}
def code(x, y): return (x * x) + (y * y)
def code(x, y): return math.pow(math.hypot(x, y), 2.0)
function code(x, y) return Float64(Float64(x * x) + Float64(y * y)) end
function code(x, y) return hypot(x, y) ^ 2.0 end
function tmp = code(x, y) tmp = (x * x) + (y * y); end
function tmp = code(x, y) tmp = hypot(x, y) ^ 2.0; end
code[x_, y_] := N[(N[(x * x), $MachinePrecision] + N[(y * y), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := N[Power[N[Sqrt[x ^ 2 + y ^ 2], $MachinePrecision], 2.0], $MachinePrecision]
x \cdot x + y \cdot y
{\left(\mathsf{hypot}\left(x, y\right)\right)}^{2}



Bits error versus x



Bits error versus y
Results
Initial program 0.0
Applied egg-rr0.0
Final simplification0.0
herbie shell --seed 2022150
(FPCore (x y)
:name "Graphics.Rasterific.Linear:$cquadrance from Rasterific-0.6.1"
:precision binary64
(+ (* x x) (* y y)))