r/cpp • u/pavel_v • Jul 29 '26
C++26: Reducing undefined behaviour
https://www.sandordargo.com/blog/2026/07/29/cpp26-reduces-undefined-behaviour
89
Upvotes
r/cpp • u/pavel_v • Jul 29 '26
View all comments
Show parent comment
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.