Re: remainder() is not right

new topic     » goto parent     » topic index » view thread      » older message » newer message

> On 4 May 2008 at 9:48, Arthur Crump wrote (maybe snipped):

> Nobody seems to have ponted out yet that the documenation for
> remainder says that the result is the same sign as the first argument,
> not the second, as CChris seems to have assumed.
> 
In my opinion he is proposing a modulo function, say mod(x, y). It 
could be defined as:

mod(x, y) = x - y * floor(x / y)

...and it will produce those results he claim remainder(x, y) should 
give. I just think they are different functions. Maybe mod(x, y) 
could be part of math.e

Best,
Euler



-- 
_
_| euler f german
_| sete lagoas, mg, brazil
_| efgerman{AT}gmail{DOT}com
_| -----------------------------
_| Reply preferably to the list,
_| or to the address above. Thx!

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu