[Cuis-dev] Documentation for the different kinds of divisions
Andres Valloud
ten at smallinteger.com
Mon May 25 14:59:44 PDT 2020
https://en.wikipedia.org/wiki/Euclidean_division
Looks like it's called centered division, and that just as div:mod:
define truncation, these two define rounding. Well, then how about
centeredDiv: and centeredMod:? They are a tad long, centerDiv: and
centerMod: perhaps?
On 5/25/20 13:44, Luciano Notarfrancesco via Cuis-dev wrote:
> On Tue, May 26, 2020 at 4:04 AM Nicolas Cellier via Cuis-dev
> <cuis-dev at lists.cuis.st <mailto:cuis-dev at lists.cuis.st>> wrote:
>
> The integer division makes sense for specialized applications.
> I used it 30 years back for polynomial factorization, if I remember,
> because it leads to smaller LargeIntegers in p-adic methods.
>
>
> Oh, now I see. The remainder of this division is also called balanced or
> centered remainder, I think, and I guess the division must be balanced
> or centered division? When dividing by m it gives a remainder between
> -m/2 and m/2, and it makes sense to use it when working with p-adics, in
> particular I use this when doing Hensel lifting when factoring
> polynomials with Zassenhauss algorithm, probably the same thing you did
> 30 years ago :)
> I think I always used the remainder and never the quotient of this
> division, but it is also an Euclidean division for the integers, and it
> has the property that the remainder is of minimal absolute value, right?
> I didn't know the quotient was important for floating point. Personally
> I'm not very convinced of the message names #ratio: and #residue: but I
> can't think anything better right now.
>
More information about the Cuis-dev
mailing list