>> This sounds promising. >> >>> -fexcess-precision=standard is not implemented for languages >>> other than C. >> >> Never mind. > > Hm. Maybe > > -mfpmath=sse > > instead? The problem with switching the whole FPU to reduced precision > is that some library functions might not expect that, so it is making me > queasy. On the other hand, using SSE might have a negative performance? > I just don't have a good idea what we are dealing with here.
In my experiment, `-fexcess-precision=standard` cannot be used for C++. ``` $ g++ -fexcess-precision=standard test.cc cc1plus: sorry, unimplemented: -fexcess-precision=standard for C++ $ g++ --version g++ (GCC) 7.4.0 Copyright (C) 2017 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ ``` On the other hand, `-msse -mfpmath=sse` uses SSE, which can only perform single-precision floating-point calculation. SSE is too low precision. `-msse2 -mfpmath=sse` uses SSE2, which can perform double-precision floating-point calculation. Precision is sufficient, but older 32-bit x86 CPUs do not have SSE2.