@verb #144:":div" this none this rxdo #55 @program #144:":div" this none this "a:div(b)" "sets a = a/b, returns a % b;" {b} = args n = length(decode_binary(b.value, 1)) m = length(decode_binary(this.value, 1)) - n d = $bignum:new(256 / (v[1] + 1)) u = $bignum:new(this) v = $bignum:new(b) this:mult(d) b:mult(d) u = decode_binary(u.value, 1) v = decode_binary(v.value, 1) q = {} j = 0 for j in [1..m + 1] if (u[j] == v[1]) qh = 255 else qh = (u[j] * 256 + u[j + 1]) / v[1] endif v[2] * qh > (u[j] * 256 + u[j + 1] - qh * v[1]) * 256 + u[j + 2] && (qh = qh - 1) "And again..." v[2] * qh > (u[j] * 256 + u[j + 1] - qh * v[1]) * 256 + u[j + 2] && (qh = qh - 1) u[j..j + n] = decode_binary(this:diff(encode_binary(@u[j..j + n]), this:mult(encode_binary(@v), encode_binary(qh))), 1) q = {@q, qh} endfor return q "Last modified by manta (#7165) on Fri Mar 9 07:18:20 2001 MST." "This verb previously owned by manta (#7165), and chowned to $slacker upon dewizarding (Sat Aug 17 14:50:06 2002 MDT)." "Last modified by Dax (#789) on Sun Aug 18 18:34:01 2002 MDT." .