But, when you divide a negative by a negative, don't you get a positive result anyways? My calculator seems to think so. BTW, at the risk of taking this thread OT, where have you been, Myke? Did your vision problem take a while to get corrected? I, for one, have missed your input here, and your Rentron articles (plus, I'm getting tired of the soft drink survey on your website) -Randy Glenn E-Mail: PICxpert@yahoo.com Web: http://i.am/PICxpert Currently wondering why I can't get in to Safe Mode - where's a Mac when you need it? -----Original Message----- From: pic microcontroller discussion list [mailto:PICLIST@MITVMA.MIT.EDU]On Behalf Of Myke Predko Sent: Monday, February 07, 2000 11:01 PM To: PICLIST@MITVMA.MIT.EDU Subject: Re: [PICLIST] 16 bit PIC math question on subtracting Hiya, The addition/subtraction routines handle and produce two's complement numbers as a matter of course. The multiplication routines should not have any problems with negatives. Dividing a negative by a negative - no the 16 bit division routine presented on my page will not do that. It's a pretty scary proposition. What I usually do is convert dividend and divisor to positive values and then when I have the positive results, I convert them to negative. myke ----- Original Message ----- From: Lorick To: Sent: Monday, February 07, 2000 9:51 PM Subject: 16 bit PIC math question on subtracting > I have been looking at the 16 bit math routines at > http://www.myke.com/PICMicro/16bit.htm and I was wondering if > someone can tell me by looking at the subtraction routine(s) there, if they > handle negative numbers. I am going to need to do things where I am ending > up with a final result that is a positive number, maybe dividing a negative > by a negative, but I want to know if these routines will do negative numbers > for my intermediate steps. If now, how can I? > __________________________________________________ Do You Yahoo!? Talk to your friends online with Yahoo! Messenger. http://im.yahoo.com