Re: remainder() is not right
- Posted by "Euler German" <eulerg at gmail.com> May 05, 2008
- 1074 views
> On 5 May 2008 at 6:30, Jeremy Cowgar wrote (maybe snipped): > Hm, I went to document the new mod() function and went to: > > http://en.wikipedia.org/wiki/Modulo_operation > > To get some more descriptive information and noticed that Euphoria is > listed there in the language table as supporting modulo operator and > that it's function name is remainder() > > So, what's up with that? Is it not correct? I see that it's listed as: > > Dividend while others are Divisor. Ada, for instance, has rem() which > is Dividend and mod() which is Divisor. > If I got the idea right, this has to do with de *ability* to convert Euphoria code into C. The modulo operator in C doesn't behave exactly the same way depending of the compiler and hardware. Seems they "fixed" it after ISO 1999. In a 100% Euphoria world remainder() should suffice, but after translated into C would it produce the same result? 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!