logoalt Hacker News

demorroyesterday at 11:33 AM2 repliesview on HN

I guess I'm confused. I thought epsilon was the smallest possible value to account for accuracy drift across the range of a floating point representation, not just "1e-4".

Done some reading. Thanks to the article to waking me up to this fact at least. I didn't realize that the epsilon provided by languages tends to be the one that only works around 1.0, and if you want to use episilons globally (which the article would say is generally a bad idea) you need to be more dynamic as your ranges, and potential errors, increase.


Replies

rpdillonyesterday at 11:43 AM

Yeah, I'm not sure how widespread the knowledge is that floating point trades precision for magnitude. Its obvious if you know the implementation, but I'm not sure most folks do.

show 2 replies
mhh__yesterday at 12:41 PM

Some languages even use different definitions of epsilon! (dotnet...)