Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

You can easily get catastrophic cancellation in physical simulations, people are just not very aware of it.

If for e.g. you see bare summation rather than some sort of sorting by magnitude then expect bad results as numbers get bigger.



It is a bit weird though, because people also get very, very clever about designing their physical simulations so that they don’t have to care too much about their working precision.


Yeah, GPUs actually helped with this a lot when they first came out because suddenly to get the great performance you had to drop to single precision, at least until 2018 or so (can’t remember exactly now, but it used to be the case that the older cards were 2x as slow at DP)


I don’t really do GPU stuff, but I expect double to be at least 1/2 as slow as single, even on good hardware. I mean it is twice as many bits. (Maybe you think in bits/second, though, which is totally fair).

I looked up my consumer card on a whim (playing with sprinkling some GPGPU into my code—cupy is actually really easy to use and ergonomic!), and apparently doubles are 1/32 as fast as singles. Yikes!




Consider applying for YC's Winter 2026 batch! Applications are open till Nov 10

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: