Y
Hacker News
new
|
ask
|
show
|
jobs
by
Piezoid
312 days ago
Close floating-point subtraction loses precision: when x >> 1, sqrt(x+1) ≈ sqrt(x), so their difference suffers cancellation and end up rounding to zero. In contrast, sqrt(x+1) + sqrt(x) approaches 2*sqrt(x) smoothly.