On 26 Nov 2003 at 22:20, James Nick Sears wrote: > If I understand correctly (I haven't looked at the code), this is the right > answer. Wow! Lack of sleep is significant. I guess my mind was confusing the issues. I'm expecting a proper fraction and want to use the remainder in a subsequent calculation/decision without going to floating point. So the whole while, I'm thinking .125 should be float 0.00100000 00000000b, and remainder should be something different than 1, duh! Not! The fraction is 1 shifted right as many times as the divisor needs to be shifted right to set C. KMIAA (Kicking Myself In the Ass Again) Sorry. Thanks for not reaming me. BRs, Mike > > 1/8 => How many times does 8 go into 1 (0) > 1%8 (mod or remainder)=> How many are left over after 8 goes into 1 as many > times as possible (1) > > Nick > > > ----- Original Message ----- > From: "Mike" > To: > Sent: Wednesday, November 26, 2003 10:51 AM > Subject: [PICLIST] [PIC]: Nikolia's 24/16 -> 24 bit divide v3 > > > > Hi: > > > > I tried this code at > > > > http://www.piclist.com/techref/microchip/math/div/24by16.htm > > > > I used the last (3rd) routine on the page. > > > > When I divide 1 by 8 or 1 by 7, etc., I always get a remainder of 1 > instead of 2 or 3, > > eic. > > > > What's up with that? Does this happen to others using the same code or did > I foul > > something up? I've checked my code 3 times, but before I cry bug, I'd like > a confirm. > > > > Er, looks like the comments wrapped so, sorry, I won't waste bandwidth > posting the > > code here. Just remember, it's the 3rd divide routine on the page. > > > > TIA, > > Mike > > > > -- > > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body > > > > -- > http://www.piclist.com#nomail Going offline? Don't AutoReply us! > email listserv@mitvma.mit.edu with SET PICList DIGEST in the body -- http://www.piclist.com hint: To leave the PICList mailto:piclist-unsubscribe-request@mitvma.mit.edu