On 10/16/26 10:36, marcel hendrix wrote:
> On 10/16/2026 5:58 AM, Krishna Myneni wrote:
>
> > extended precision (p = 64 bits)
> > double double precision (p = 106 bits)
> > quad precision (p = 113 bits)
> > double extended precision (p = 128 bits)
> > double quad precision (p = 226 bits)
> >
> > Then M = 70, and H >= 73 significant digits.
>
> Which implies H >= 83 for quad double extended precision,
> meaning the available QD* in that library is not sufficient.
> Although only QDNEGATE , qd=10 QD* , qd=10 QD/ , and QDF+ are needed, one can't get by with a bit shift routine and a simple QQDF+, as +/-INF, NAN and subnormals must be handled.
>
> Or give up in disgust and link to an external library.
>
> Either that or go for II.2.
>
> -marcel
Yes, I expect QD* which I assume is quad double mulitply is probably not sufficient to handle quad extended requirements. One point I forgot to mention is that the Forth standard for REPRESENT requires rounding to nearest, in which case H_min = M (not M+3). There's no way I can see to avoid using big number arithmetic for the quad extended precision case.
It's not hopeless. We have big number arithmetic library code in Forth with which to learn how to deal with just about any case. The learning curve is there, of course.
To handle +/-INF and NAN, isn't it sufficient to examine the bit pattern for the leading extended precision number in the quad extended precision set i.e. no arithmetic should be needed to handle +/-INF and NAN? I'm not sure if subnormals will be more difficult to handle than normal numbers -- their precision is always less than or equal to normal numbers.
--
KM