<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Le lun. 25 mai 2020 à 07:55, Andres Valloud via Cuis-dev <<a href="mailto:cuis-dev@lists.cuis.st">cuis-dev@lists.cuis.st</a>> a écrit :<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Why would you want to add division with floating point properties to the <br>
integers? The reference you mention,<br>
<br>
<a href="https://www.cplusplus.com/reference/cmath/remainder/" rel="noreferrer" target="_blank">https://www.cplusplus.com/reference/cmath/remainder/</a><br>
</blockquote><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
does not mention the integers, and instead seems entirely concerned with <br>
floating point arithmetic (where, presumably, a division with floating <br>
point properties would be relevant). Surely we already have (several <br>
flavors of) exact quotients for the integers. Is there a reason why <br>
this has been pending since 2015?<br>
<br></blockquote><div><br></div><div>Waouh, very negative reaction!</div><div>ratio: and residue: perfectly works with Integer/Fraction receiver/arguments as we would expect: they delivered a "centered" modulo and rounded quotient and don't mess with Float at all.</div><div>In addition, ratio: and residue: do the correct thing they should when invoked with Float.</div><div>Why is it still pending?<br></div><div>Because no one cares of floating point standards in the Smalltalk community?</div><div> <br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
On 5/24/20 22:38, Nicolas Cellier via Cuis-dev wrote:<br>
> Note that I have yet another species of division pending for Squeak: <br>
> ratio: and residue:<br>
> The difference is that the quotient is rounded to nearest integer (tie <br>
> to even) rather than truncated or floored.<br>
> It is important for Floating point because it provides an exact <br>
> remainder and adhere to ISO/IEC 60559 - i.e. like <br>
> <a href="http://www.cplusplus.com/reference/cmath/remainder/" rel="noreferrer" target="_blank">http://www.cplusplus.com/reference/cmath/remainder/</a><br>
> Since we have LargeIntegers, I also provide exact quotient (an Integer).<br>
> See <a href="https://source.squeak.org/inbox/Kernel-nice.903.diff" rel="noreferrer" target="_blank">https://source.squeak.org/inbox/Kernel-nice.903.diff</a><br>
> <br>
> Le dim. 24 mai 2020 à 15:02, Andres Valloud via Cuis-dev <br>
> <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a> <mailto:<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>>> a écrit :<br>
> <br>
> :SeemsGood:<br>
> <br>
> On 5/23/20 22:50, Luciano Notarfrancesco via Cuis-dev wrote:<br>
> > This fixes some issues and makes it more clear, I think.<br>
> ><br>
> > On Sun, May 24, 2020 at 1:47 AM Andres Valloud via Cuis-dev<br>
> > <<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a> <mailto:<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>><br>
> <mailto:<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a> <mailto:<a href="mailto:cuis-dev@lists.cuis.st" target="_blank">cuis-dev@lists.cuis.st</a>>>> wrote:<br>
> ><br>
> > ... needs more attention.<br>
> ><br>
> > On 5/16/20 22:54, Luciano Notarfrancesco via Cuis-dev wrote:<br>
> > > I added some documentation about // \\ quo: rem: div: mod:<br>
> and /.<br>
> > Let me<br>
> > > know what you think.<br>
> > ><br>
> > --<br>
> > Cuis-dev mailing list<br>
> > <a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a> <mailto:<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a>><br>
> <mailto:<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a> <mailto:<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a>>><br>
> > <a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
> ><br>
> ><br>
> -- <br>
> Cuis-dev mailing list<br>
> <a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a> <mailto:<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a>><br>
> <a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
> <br>
> <br>
-- <br>
Cuis-dev mailing list<br>
<a href="mailto:Cuis-dev@lists.cuis.st" target="_blank">Cuis-dev@lists.cuis.st</a><br>
<a href="https://lists.cuis.st/mailman/listinfo/cuis-dev" rel="noreferrer" target="_blank">https://lists.cuis.st/mailman/listinfo/cuis-dev</a><br>
</blockquote></div></div>