Re: LZ: fractions


[Prev][Next][Index][Thread]

Re: LZ: fractions



On Wed, 21 Aug 1996, David Kristensen wrote:


> Does anyone know a quick way to divide a number that is not divisible by
> two. I'm not a math expert, but many of you are. I need to find a way to
> find things like 1/3 or 1/5 of a number. (If it was multiplication, I might
> be able to do it, but division is a bit harder).




To divide by 3, retain the original number, divide by 2, then subtract
the original number.


To divide by 5 do the same thing except divide by 4.


This works as long as you know the divisor.  If you have to be
able to divide any number by any other you need a subroutine.


Barry


References: