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




Bits error versus x




Bits error versus y
Results
| Original | 5.5 |
|---|---|
| Target | 0.1 |
| Herbie | 0.1 |
Initial program 5.5
Simplified5.5
Applied egg-rr0.1
Applied egg-rr0.1
Final simplification0.1
herbie shell --seed 2022131
(FPCore (x y)
:name "Numeric.Integration.TanhSinh:everywhere from integration-0.2.1"
:precision binary64
:herbie-target
(+ x (* (* x y) y))
(* x (+ 1.0 (* y y))))