> Le 14 sept. 2023 à 10:35, Jan Beulich a écrit : > > Assuming all architectures you care about use IEEE representation only. > Think about x86'es 80-bit floating point data type, which - apart from > ia64 - probably isn't used much elsewhere. In x86 compilers you even > often can control via command line option what exactly long double is. > How is that going to work for your use of strtold() in all cases? This is a valid objection. Scenario 1: Strtold yields a 80 bits long double but the user wants a 128 bits (IEEE) long double. This will not work. In this case a 128 bit strtold should be called. Since the compiler MUST be prepared for BOTH eventualities, it has a mean of calling the 128 bits strtold, that should be named strtold128, or whatever. In that case, the only modification needed here is to change « strtold » to strtold128. The libc of most targets has already a thing like that. Scenario 2: Strtold yields a 128 bit long double but user wants an 80 bit long double. In this case there is a quite trivial conversion needed. Scenario 3: _Float16 is not implemented in gcc. For instance gcc 11 doesn’t support _Float16. For those cases I wrote a conversion, and now I call the conversion for older gcc versions. In any case I am sure it is much easier to write a 16 bit number as an integer than as a _Float16. So, this is not very important.