Re: NAFCQY [Not A FastCode Question, Yay!]: Int64 DivMod



Lord Crc wrote:
>
> Here's a version that should work, at least it did for the few tests I
> performed :)

Looks much better! (Mange takk!)

> I'm still not sure how you want signes to be handled. So far it
> performs Abs() on both Dividend and Divisor, but this can be changed
> to mimic div / mod behaviour.

Dare I ask how? :-)
Yes, I would like signs to be handled like div and mod would handle it.
i.e. the function should have identical output to

Result := Dividend div Divisor;
Remainder := Dividend mod Divisor;

is it hard to do? Thanks!

--
Kristofer



.



Relevant Pages

  • Re: Really big math problem
    ... we mentally shifted the divisor (the number we ... digit of the dividend. ... We'd multiply the shifted divisor by that number, ...
    (microsoft.public.vc.mfc)
  • Re: Troubleshooting error in VB 6.0
    ... Chances are, you're reading data from a database into a recordset, and when going through the recordset, you're attempting to assign the field's value to a string variable or perhaps a textbox. ... Private Sub ShowRemainder(ByVal Divisor As Long, ByVal Dividend As Long) ...
    (microsoft.public.vb.general.discussion)
  • Re: division of two 4-bit vectors
    ... help, i am suposed to program a simple calculator in vhdl, and program ... repeatedly subtract the divisor from the dividend, ... DOULOS - Developing Design Know-how ...
    (comp.lang.vhdl)
  • Re: DIV overflow
    ... word divisor;if you want a 16-bit divisor ... MOV eax, dword dividend ...
    (alt.lang.asm)
  • Re: relationship between divisor and dividend in CRC codes
    ... between divisor and dividend in CRC codes ... Dividend and divisor are ... The remainder is the polynomial, ...
    (sci.crypt)