[gdal-dev] Slightly-off failing tests on i686
Greg Troxel
gdt at lexort.com
Wed Oct 29 06:13:08 PDT 2025
Even Rouault via gdal-dev <gdal-dev at lists.osgeo.org> writes:
> we do have a CI configuration for i386 using clang in debug
> mode. Maybe your use of gcc in -O2 yields to slightly different
> results in some cases.
It makes sense that -O2 could differ. double when stored in memory is
the standard IEEE754 width. When stored in fp registers it's 80, so
with -O2 chained fp calculations use more precision before being stored,
and can get slightly different results. With -ffloat-store, each
register is store/loaded or something like that to aovid this. Without
-O2, it would seem that store/load is more likely.
Arguably the use of 80-bit intermediaries gets better results, but they
are not the same bits one gets with an exact IEEE754 implementation.
More information about the gdal-dev
mailing list