Re: remainder() is not right

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

Euler German wrote:
> 
> Maybe I didn't express myself clearly. What I mean is that an 
> Euphoria program translated into C and compiled by a C compiler could 
> produce different results depending on the C compiler and/or the 
> hardware used. I was thinking on what Ricardo Forno said about it:
> 
>     <rf>
>     More on the subject.
>     In C, there are two ways to get an integer quotient:
>     q = floor(a /(double)b);
>     and
>     q = (int)(a / (double)b);
> 
>     For negative "a", they give different results.
>     </rf>

I suppose this is theoretically true, but is anyone aware of differing
implementations of remainder or mod or whatever we're talking about?
There are only a handful of compilers that will currently build euphoria,
so we've already got that situation if the C libraries differ.

Matt

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

Search



Quick Links

User menu

Not signed in.

Misc Menu