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




Bits error versus x




Bits error versus y
Results
| Original | 5.5 |
|---|---|
| Target | 0.1 |
| Herbie | 0.2 |
Initial program 5.5
Simplified5.5
Applied add-sqr-sqrt_binary645.5
Applied associate-*r*_binary645.5
Simplified5.5
Applied add-sqr-sqrt_binary645.6
Simplified5.6
Simplified0.2
Applied pow1_binary640.2
Applied pow1_binary640.2
Applied pow-prod-down_binary640.2
Final simplification0.2
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))))