News for hackers. Stuff that matters.
Re:PLOS2021: ISO-C became unusable for operating systems by Asooka on Wednesday October 06, 2021 @08:06PM (#28780071)
It was many months ago and I no longer remember the full details, plus it's proprietary code, so I can't tell them to you. But the gist was that after optimisation, some floating point arithmetic was done in different order by different compilers. This particular expression really needed to be computed in exact order and, since nothing else worked, we had to just write it in compiler-specific assembly. IIRC some language extensions are coming to better specify float semantics on a per-function basis that might help one day.
Re:PLOS2021: ISO-C became unusable for operating systems by astrange on Wednesday October 06, 2021 @08:13PM (#28780124)
That's a compiler bug. Floating-point math shouldn't be reassociated unless you were using -ffast-math, which is indeed a poorly named option that does bad things, but one many people demand.
Re:PLOS2021: ISO-C became unusable for operating systems by cozzyd on Wednesday October 06, 2021 @08:46PM (#28780362)
I think icc might be more cavalier about this sort of thing.