Code Comments
Programming Forum and web based access to our favorite programming groups.Clark, Can you try this (slight) variation - and compile 01 numerator value 1 Comp-5 pic 9(9). 01 denominator value 5 Comp-5 pic 9(9). 01 quotient Comp-5 pic 9(9)v9(4). compute quotient = numerator / denominator display quotient My guess is that they would still be doing it in decimal, but this would "fo rce" the compiler into knowing the fields were to be truncated/handeld in "true" binary rather than based on the PIC. -- Bill Klein wmklein <at> ix.netcom.com "tlmfru" <lacey@mts.net> wrote in message news:SJvIj.51320$097.28239@newsfe21.lga... > > Clark F Morris <cfmpublic@ns.sympatico.ca> wrote in message > news:if05v3503beg04nonbeci3n8eqo2vill79@ 4ax.com... > <cfmpublic@ns.sympatico.ca> wrote: > talk about 'binary > point. Here's an > > > He's right, you know. > > 0.2 (decimal) in binary = 1/8 + 1/16 + 1/128 + 1/256 ... = .00110011 ... = > 0.19921875. etc. Obviously binary division is done by black magic > involving shifts & counts. > > PL > >
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.