Re: remainder() is not right
- Posted by Matt Lewis <matthewwalkerlewis at ?m?il.com> May 05, 2008
- 1072 views
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