Comment

Comment by Piezoid

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.
parent Piezoid 1 year ago

No comments yet

Be the first to share your thoughts.

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton