r/cpp • • Jul 29 '26

C++26: Reducing undefined behaviour

https://www.sandordargo.com/blog/2026/07/29/cpp26-reduces-undefined-behaviour
89 Upvotes

48 comments sorted by

View all comments

Show parent comment

3

u/TheThiefMaster C++latest fanatic (and game dev) Jul 30 '26

and there are lots of those floating around.

Are there? There were historically, but isn't IEEE floating point universal now?

PS: nice pun.

2

u/serviscope_minor Aug 06 '26

Well, there's IEEE and IEEE. The hardware generally mostly implements IEEE with not that many bugs (the 80bit FPUs of x87 are fading into the past). Buuuut you might not get quite the same results on different compilers and platforms due to some optimizations. I have heard a case for double/double1394 or fastdouble/double types giving respectively the best the compiler can do and a pedantically correct same-on-all-platforms but potentially slower calculation.