TonyTebby wrote:
> I hardly dare to disagree with Marcel but I would describe it as a bug.

Oh well, if you wouldn't dare, who would? ;-)

> It would not be a bug on any other system because as Marce rightly
> says "In University one gets taught to NEVER EVER try to compare two
> FP values using the "equals" operator" so you could not rely on the
> result. In SMSQ, you should be able to rely on the result.

OK, thanks. Good to know.

> In this case, the values are exact, it is just that they are not represented
> exactly the same. The problem being that for all integral n, 2^n and -(2^n)
> have different exponents when normalised. I thought that all negation
> operations in SMSQ checked for this - is it a general problem or is just
> certain implementations of SMSQ?

I suppose it's QPC only as QPC exchanges all the original FP calls
with a few "QDOS to IEEE, compute using FPU, IEEE to QDOS" routines
(which doesn't really take more time than, say, about 5 emulated
average instructions...). The problem seems to lie in the back
conversion to QDOS format and only affects negative numbers. I think I
have fixed it, but then I have some headache at the moment and FP
arithmetics is no fun even when fit and sober.

BTW, I've read that Quanta published some IEEE<->QDOS FP conversion
routines in the past (might have been quite some time ago). Does
anybody remember this and can scan me a copy?

In a somewhat related story, exactly that piece of code we're talking
about once helped Connectix (recently bought by Microsoft) to fix a
bug they were experiencing in their VirtualPC for Mac emulator. In
fact my code didn't work at all on their software but after sending
them a heavily cut down version (about 50 lines in total) they were
able to solve the problem right away (a very small number was wrongly
rounded to infinite by their FPU emulation). Still waiting for my
cheque in the mail, though ;-)

Marcel

Reply via email to