模除 (Chinese Wikipedia)

Analysis of information sources in references of the Wikipedia article "模除" in Chinese language version.

refsWebsite
Global rank Chinese rank
1st place
1st place
low place
low place
629th place
556th place
67th place
154th place
153rd place
238th place
low place
low place
low place
low place
low place
low place
low place
low place
6th place
4th place
9,657th place
6,478th place
low place
low place
low place
low place
low place
low place
4,194th place
6,048th place
916th place
1,065th place
low place
low place
2,158th place
3,777th place
low place
low place
1,185th place
809th place
2nd place
23rd place
4,221st place
2,953rd place
low place
low place
low place
low place
low place
low place
low place
low place
low place
low place
low place
low place
low place
low place
7,871st place
6,207th place
low place
8,973rd place
low place
low place
3,671st place
3,893rd place
691st place
943rd place
low place
low place
low place
low place

acm.org (Global: 1,185th place; Chinese: 809th place)

portal.acm.org

  • Boute, Raymond T. The Euclidean definition of the functions div and mod. ACM Transactions on Programming Languages and Systems (ACM Press (New York, NY, USA)). April 1992, 14 (2): 127–144. doi:10.1145/128861.128862 (英语). 
    Let us recall Euclid’s theorem.
    THEOREM. For any real numbers and with , there exists a unique pair of numbers satisfying the following conditions:
    (a) ;
    (b) ;
    (c) .
    For the particular case of integers, the conditions (a)-(c) correspond to part of the axioms for Euclidean rings [9].
    With the notational conventions of the theorem, we define and . Clearly the correspondingly labeled conditions are satisfied.
    Properties
    where and is as defined earlier. ()

apple.com (Global: 67th place; Chinese: 154th place)

developer.apple.com

archive.org (Global: 6th place; Chinese: 4th place)

clojure.github.io (Global: low place; Chinese: low place)

coding-guidelines.com (Global: low place; Chinese: low place)

  • Jones, Derek M. The New C Standard: An Economic and Cultural Commentary (PDF). Addison-Wesley. 2003 [2018-07-11]. ISBN 9780201709179. (原始内容 (PDF)存档于2018-07-11) (英语). 
    C99 reflects almost universal processor behavior (as does the Fortran Standard). This definition truncates toward zero and the expression (-(a/b) == (-a)/b) && (-(a/b) == a/(-b)) is always true. It also means that the absolute value of the result does not depend on the signs of the operands; for example:
    +10 / +3 == +3 +10 % +3 == +1 -10 / +3 == -3 -10 % +3 == -1
    +10 / -3 == -3 +10 % -3 == +1 -10 / -3 == +3 -10 % -3 == -1
    C90
    When integers are divided and the division is inexact, if both operands are positive the result of the / operator is the largest integer less than the algebraic quotient and the result of the % operator is positive. If either operand is negative, whether the result of the / operator is the largest integer less than or equal to the algebraic quotient or the smallest integer greater than or equal to the algebraic quotient is implementation-defined, as is the sign of the result of the % operator.
    If either operand is negative, the behavior may differ between C90 and C99, depending on the implementation-defined behavior of the C90 implementation.
    #include <stdio.h>
    
    int main(void)
    {
    int x = -1,
    y = +3;
    if ((x%y > 0) ||
        ((x+y)%y == x%y))
        printf("This is a C90 translator behaving differently than C99\n");
    }
    
    Quoting from the C9X Revision Proposal, WG14/N613, that proposed this change:
    The origin of this practice seems to have been a desire to map C’s division directly to the “natural” behavior of the target instruction set, whatever it may be, without requiring extra code overhead that might be necessary to check for special cases and enforce a particular behavior. However, the argument that Fortran programmers are unpleasantly surprised by this aspect of C and that there would be negligible impact on code efficiency was accepted by WG14, who agreed to require Fortran-like behavior in C99.

coffeescript.org (Global: low place; Chinese: low place)

dart.dev (Global: low place; Chinese: low place)

api.dart.dev

dlang.org (Global: low place; Chinese: low place)

doi.org (Global: 2nd place; Chinese: 23rd place)

  • Boute, Raymond T. The Euclidean definition of the functions div and mod. ACM Transactions on Programming Languages and Systems (ACM Press (New York, NY, USA)). April 1992, 14 (2): 127–144. doi:10.1145/128861.128862 (英语). 
    Let us recall Euclid’s theorem.
    THEOREM. For any real numbers and with , there exists a unique pair of numbers satisfying the following conditions:
    (a) ;
    (b) ;
    (c) .
    For the particular case of integers, the conditions (a)-(c) correspond to part of the axioms for Euclidean rings [9].
    With the notational conventions of the theorem, we define and . Clearly the correspondingly labeled conditions are satisfied.
    Properties
    where and is as defined earlier. ()

elm-lang.org (Global: low place; Chinese: low place)

package.elm-lang.org

erlang.org (Global: low place; Chinese: low place)

go.dev (Global: low place; Chinese: low place)

pkg.go.dev

go.dev

hansotten.com (Global: low place; Chinese: low place)

pascal.hansotten.com

  • ISO/IEC 7185, Information Technology—Programming Languages–Pascal. International Standard, 2nd ed. (PDF). ISO/IEC 7185, 1990 (E). [2024-10-16]. (原始内容存档 (PDF)于2024-10-23). 
    A term of the form i div j shall be an error if j is zero; otherwise, the value of i div j shall be such that
    abs(i) - abs(j) < abs((i div j) * j) <= abs(i)
    where the value shall be zero if abs(i) < abs(j); otherwise, the sign of the value shall be positive if i and j have the same sign and negative if i and j have different signs.
    A term of the form i mod j shall be an error if j is zero or negative; otherwise, the value of i mod j shall be that value of (i - (k * j)) for integral k such that 0 <= i mod j < j.
    NOTE 2 — Only for i >= 0 and j > 0 does the relation (i div j) * j + i mod j = i hold.
    Kathleen Jensen, Niklaus Wirth. PASCAL User Manual and Report - ISO Pascal Standard (PDF). 1991 [2024-10-18]. (原始内容存档 (PDF)于2023-02-20). 
    div   divide and truncate (i.e., value is not rounded)
    mod   modulus: let Remainder = A - (A div B) * B;
      if Remainder < 0 then A mod B = Remainder + B

      otherwise A mod B = Remainder

haskell.org (Global: low place; Chinese: low place)

hexdocs.pm (Global: low place; Chinese: low place)

iso.org (Global: 629th place; Chinese: 556th place)

julialang.org (Global: low place; Chinese: low place)

docs.julialang.org

khronos.org (Global: 9,657th place; Chinese: 6,478th place)

kotlinlang.org (Global: low place; Chinese: low place)

microsoft.com (Global: 153rd place; Chinese: 238th place)

docs.microsoft.com

  • Operators. Microsoft. [2021-07-19]. (原始内容存档于2022-08-31). The % operator is defined only in cases where either both sides are positive or both sides are negative. Unlike C, it also operates on floating-point data types, as well as integers. 
  • QuantumWriter. Expressions. docs.microsoft.com. [2018-07-11]. (原始内容存档于2018-10-26) (美国英语). 

learn.microsoft.com

nasm.us (Global: low place; Chinese: low place)

ocaml.org (Global: low place; Chinese: low place)

open-std.org (Global: 4,221st place; Chinese: 2,953rd place)

opengroup.org (Global: 3,671st place; Chinese: 3,893rd place)

pubs.opengroup.org

perl.org (Global: low place; Chinese: low place)

perldoc.perl.org

php.net (Global: 4,194th place; Chinese: 6,048th place)

purescript.org (Global: low place; Chinese: low place)

pursuit.purescript.org

r-project.org (Global: 7,871st place; Chinese: 6,207th place)

search.r-project.org

r6rs.org (Global: low place; Chinese: low place)

rust-lang.org (Global: low place; Chinese: 8,973rd place)

doc.rust-lang.org

teamleadnet.com (Global: low place; Chinese: low place)

blog.teamleadnet.com

utexas.edu (Global: 916th place; Chinese: 1,065th place)

cs.utexas.edu

  • ISO/IEC 7185, Information Technology—Programming Languages–Pascal. International Standard, 2nd ed. (PDF). ISO/IEC 7185, 1990 (E). [2024-10-16]. (原始内容存档 (PDF)于2024-10-23). 
    A term of the form i div j shall be an error if j is zero; otherwise, the value of i div j shall be such that
    abs(i) - abs(j) < abs((i div j) * j) <= abs(i)
    where the value shall be zero if abs(i) < abs(j); otherwise, the sign of the value shall be positive if i and j have the same sign and negative if i and j have different signs.
    A term of the form i mod j shall be an error if j is zero or negative; otherwise, the value of i mod j shall be that value of (i - (k * j)) for integral k such that 0 <= i mod j < j.
    NOTE 2 — Only for i >= 0 and j > 0 does the relation (i div j) * j + i mod j = i hold.
    Kathleen Jensen, Niklaus Wirth. PASCAL User Manual and Report - ISO Pascal Standard (PDF). 1991 [2024-10-18]. (原始内容存档 (PDF)于2023-02-20). 
    div   divide and truncate (i.e., value is not rounded)
    mod   modulus: let Remainder = A - (A div B) * B;
      if Remainder < 0 then A mod B = Remainder + B

      otherwise A mod B = Remainder

w3.org (Global: 691st place; Chinese: 943rd place)

web.archive.org (Global: 1st place; Chinese: 1st place)

xs4all.nl (Global: 2,158th place; Chinese: 3,777th place)

jmvdveer.home.xs4all.nl

  • A. van Wijngaarden, B. J. Mailloux, J. E. L. Peck, C. H. A. Koster, M. Sintzoff, C. H. Lindsey, L. G. L.T. Meertens and R. G. Fisker. Revised Report on the Algorithmic Language Algol 68. IFIP W.G. 2.1. [2024-10-16]. (原始内容存档于2020-07-11). 
    10.2.3.3. Operations on integral operands
    ……
    m) OP «÷, %, OVER» = (L INT a, b) L INT:
          IF b ≠ L 0
          THEN L INT q := L 0, r := ABS a;
             WHILE (r := r - ABS b) ≥ L 0 DO q := q + L 1 OD;
             (a < L 0 AND b > L 0 OR a ≥ L 0 AND b < L 0 | -q | q)
          FI;
    n) OP «÷×, ÷*, %*, MOD» = (L INT a, b) L INT:
          (L INT r = a - a ÷ b × b; r < 0 | r + ABS b | r);
    

ziglang.org (Global: low place; Chinese: low place)