Re: remainder() is not right

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

> 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!

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

Search



Quick Links

User menu

Not signed in.

Misc Menu