> My result from a DP in dividing 1300 by 3 is 00 00 00 43 3C 00 1C
> but on a calculator it is displayed as 433.33333 - which is what
> I want to display in a field on a screen. How do I turn that
> remainder of 1C into the decimal value ?

You should have enough to do it as scaled decimal.

Consider the dividend as 1300.0000, divide by 3 and you
get 433.3333 ( and remainder 0.0001)

Multiply the dividend by 10000 (probably with SRP) then do the
divide, and the quotient will have four digits after the decimal
point. Print at appropriately.

If you don't have enough digits to do that, you can convert the
already computed remainder by muliplying it by 10000 (SRP)
and then dividing it by the original divisor, 3, to
get 3333 remainder 1. That is, considering the shift, 0.3333
remainder 0.0001.

-- glen

Reply via email to