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

Andres Valloud ten at smallinteger.com
Sun May 24 22:54:53 PDT 2020


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?

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


More information about the Cuis-dev mailing list