(FPCore (x y) :precision binary64 (* x (- 1.0 (* x y))))
(FPCore (x y) :precision binary64 (+ (* x (fma 1.0 1.0 (- (* y x)))) (* x (fma (- y) x (* y x)))))
double code(double x, double y) {
return x * (1.0 - (x * y));
}
double code(double x, double y) {
return (x * fma(1.0, 1.0, -(y * x))) + (x * fma(-y, x, (y * x)));
}
function code(x, y) return Float64(x * Float64(1.0 - Float64(x * y))) end
function code(x, y) return Float64(Float64(x * fma(1.0, 1.0, Float64(-Float64(y * x)))) + Float64(x * fma(Float64(-y), x, Float64(y * x)))) end
code[x_, y_] := N[(x * N[(1.0 - N[(x * y), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
code[x_, y_] := N[(N[(x * N[(1.0 * 1.0 + (-N[(y * x), $MachinePrecision])), $MachinePrecision]), $MachinePrecision] + N[(x * N[((-y) * x + N[(y * x), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]), $MachinePrecision]
x \cdot \left(1 - x \cdot y\right)
x \cdot \mathsf{fma}\left(1, 1, -y \cdot x\right) + x \cdot \mathsf{fma}\left(-y, x, y \cdot x\right)



Bits error versus x



Bits error versus y
Initial program 0.1
Applied *-un-lft-identity_binary640.1
Applied prod-diff_binary640.1
Applied distribute-rgt-in_binary640.1
Final simplification0.1
herbie shell --seed 2022129
(FPCore (x y)
:name "Numeric.SpecFunctions:log1p from math-functions-0.1.5.2, A"
:precision binary64
(* x (- 1.0 (* x y))))