[Cuis-dev] Documentation for the different kinds of divisions

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Sun May 24 23:20:41 PDT 2020


Le lun. 25 mai 2020 à 07:55, Andres Valloud via Cuis-dev <
cuis-dev at lists.cuis.st> a écrit :

> Why would you want to add division with floating point properties to the
> integers?  The reference you mention,
>
> https://www.cplusplus.com/reference/cmath/remainder/
>

does not mention the integers, and instead seems entirely concerned with
> floating point arithmetic (where, presumably, a division with floating
> point properties would be relevant).  Surely we already have (several
> flavors of) exact quotients for the integers.  Is there a reason why
> this has been pending since 2015?
>
>
Waouh, very negative reaction!
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.
In addition, ratio: and residue: do the correct thing they should when
invoked with Float.
Why is it still pending?
Because no one cares of floating point standards in the Smalltalk community?

On 5/24/20 22:38, Nicolas Cellier via Cuis-dev wrote:
> > Note that I have yet another species of division pending for Squeak:
> > ratio: and residue:
> > The difference is that the quotient is rounded to nearest integer (tie
> > to even) rather than truncated or floored.
> > It is important for Floating point because it provides an exact
> > remainder and adhere to ISO/IEC 60559 - i.e. like
> > http://www.cplusplus.com/reference/cmath/remainder/
> > Since we have LargeIntegers, I also provide exact quotient (an Integer).
> > See https://source.squeak.org/inbox/Kernel-nice.903.diff
> >
> > Le dim. 24 mai 2020 à 15:02, Andres Valloud via Cuis-dev
> > <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> a écrit :
> >
> >     :SeemsGood:
> >
> >     On 5/23/20 22:50, Luciano Notarfrancesco via Cuis-dev wrote:
> >      > This fixes some issues and makes it more clear, I think.
> >      >
> >      > On Sun, May 24, 2020 at 1:47 AM Andres Valloud via Cuis-dev
> >      > <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>
> >     <mailto:cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>>>
> wrote:
> >      >
> >      >     ... needs more attention.
> >      >
> >      >     On 5/16/20 22:54, Luciano Notarfrancesco via Cuis-dev wrote:
> >      >      > I added some documentation about // \\ quo: rem: div: mod:
> >     and /.
> >      >     Let me
> >      >      > know what you think.
> >      >      >
> >      >     --
> >      >     Cuis-dev mailing list
> >      > Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
> >     <mailto:Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>>
> >      > https://lists.cuis.st/mailman/listinfo/cuis-dev
> >      >
> >      >
> >     --
> >     Cuis-dev mailing list
> >     Cuis-dev at lists.cuis.st <mailto:Cuis-dev at lists.cuis.st>
> >     https://lists.cuis.st/mailman/listinfo/cuis-dev
> >
> >
> --
> Cuis-dev mailing list
> Cuis-dev at lists.cuis.st
> https://lists.cuis.st/mailman/listinfo/cuis-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20200525/30aba978/attachment.htm>


More information about the Cuis-dev mailing list