Mirsad Todorovac wrote:
What people really need is an arithmetic with more precision and that already exists in several versions including freeware (see gmp)
Certainly. Yet please note how for example a version of M$ CC started to map long double calculations into simple 64-bit double, throwing 16 bits of precision customers have paid for not into recycle bin, but into /dev/null ...
With all due criticism of Microsoft, I don't quite agree. AFAIK, the "official" formats of IA32 floating point are 32 and 64 bits, while the 80 bits format was meant as an internal format, to be used for temporary results. So I think it's valid for a language to not offer it to the programmer (though GCC/GPC and BP do, which is also valid :-), in particular if one wants to avoid "surprises" (rounding errors strike with full force in the 80 bits type because there's no extra precision, whereas a results stored in 64 bits and computed in 80 bits (which the processor always does if a temporary result isn't stored in shorter form) are more accurate). I don't know if that what their reason -- but then, I'm not even sure if `long double' is a standard C type ...
I'm certain that GPC team is able to do the task correctly, to the last theoretically achievable bit of precision, it's only the matter whether it is worthwhile the effort.
Well, I think this would be an issue for the GCC (backend) and library (libm) teams, not so much for us.
If Frank's idea of typecast operators is achivable, it might be a more general solution, and this way probably a better one ...
Yes, this might be the way to go (but don't expect it too soon, since it's really not trivial). Then it's an issue for us and some Pascal programmer ...
Frank