Re: mod/div (was: reduce metaoperator on an empty list)

2005-05-23 Thread Mark Reed
I would really like to see ($x div $y) be (floor($x/$y)) and ($x mod $y) be ($x - $x div $y). If the divisor is positive the modulus should be positive, no matter what the sign of the dividend. Avoids lots of special case code across 0 boundaries. On 2005-05-23 18:49, "TSa (Thomas Sandlaß)" <[

mod/div (was: reduce metaoperator on an empty list)

2005-05-23 Thread TSa (Thomas Sandlaß)
[EMAIL PROTECTED] wrote: There are actuall two usefull definition for %. The first which Ada calls 'mod' always returns a value 0<=XSigned integer division and remainder are defined by the relation: A = (A/B)*B + (A rem B) where (A rem B) has the sign of A and an absolute value less than