arithmetic-operations-for/naturals-big-endian

View on GitHub

Showing 93 of 93 total issues

Function _idivmod_schoolbook_large_divisor has 9 arguments (exceeds 4 allowed). Consider refactoring.
Open

    r,
    a,
    ai,
    aj,
    b,
Severity: Major
Found in src/core/arithmetic/div/_idivmod_schoolbook_large_divisor.js - About 1 hr to fix

    Function _idivmod_dc_32 has 28 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

    export default function _idivmod_dc_32(r, a, ai, aj, b, bi, bj, c, ci, cj) {
        assert(r >= 2);
        assert(ai >= 0 && aj <= a.length);
        assert(bi >= 0 && bj <= b.length);
        assert(ci >= 0 && cj <= c.length);
    Severity: Minor
    Found in src/core/arithmetic/div/_idivmod_dc_32.js - About 1 hr to fix

      Function _mul_limb has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
      Open

      export default function _mul_limb(r, x, b, bi, bj, c, ci, cj) {
          assert(r >= 2);
          assert(x >= 0 && x <= r - 1);
          assert(bi >= 0 && bj <= b.length);
          assert(ci >= 0 && cj <= c.length);
      Severity: Minor
      Found in src/core/arithmetic/mul/_mul_limb.js - About 1 hr to fix

      Cognitive Complexity

      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

      A method's cognitive complexity is based on a few simple rules:

      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
      • Code is considered more complex for each "break in the linear flow of the code"
      • Code is considered more complex when "flow breaking structures are nested"

      Further reading

      Function _convert_to_smaller_slow has 27 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

      export default function _convert_to_smaller_slow(f, t, a, ai, aj, b, bi, bj) {
          assert(f >= t);
          assert(ai >= 0 && aj <= a.length);
          assert(bi >= 0 && bj <= b.length);
          assert(aj - ai >= 1);
      Severity: Minor
      Found in src/core/convert/_convert_to_smaller_slow.js - About 1 hr to fix

        Function _extended_euclidean_algorithm has 26 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

        export default function _extended_euclidean_algorithm(r, a, ai, aj, b, bi, bj) {
            assert(r >= 2);
            assert(ai >= 0 && aj <= a.length);
            assert(bi >= 0 && bj <= b.length);
            assert(aj - ai <= 0 || a[ai] !== 0);
        Severity: Minor
        Found in src/core/arithmetic/gcd/_extended_euclidean_algorithm.js - About 1 hr to fix

          Function _sub has 26 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

          export default function _sub(r, a, ai, aj, b, bi, bj, c, ci, cj) {
              assert(r >= 2);
              assert(ai >= 0 && aj <= a.length);
              assert(bi >= 0 && bj <= b.length);
              assert(ci >= 0 && cj <= c.length);
          Severity: Minor
          Found in src/core/arithmetic/sub/_sub.js - About 1 hr to fix

            Function _convert_to_smaller_slow has 8 arguments (exceeds 4 allowed). Consider refactoring.
            Open

            export default function _convert_to_smaller_slow(f, t, a, ai, aj, b, bi, bj) {
            Severity: Major
            Found in src/core/convert/_convert_to_smaller_slow.js - About 1 hr to fix

              Function _mul_limb has 8 arguments (exceeds 4 allowed). Consider refactoring.
              Open

              export default function _mul_limb(r, x, b, bi, bj, c, ci, cj) {
              Severity: Major
              Found in src/core/arithmetic/mul/_mul_limb.js - About 1 hr to fix

                Function _idivmod_limb_with_prefix has 8 arguments (exceeds 4 allowed). Consider refactoring.
                Open

                export default function _idivmod_limb_with_prefix(r, tmp, d, D, Di, Dj, Q, Qi) {
                Severity: Major
                Found in src/core/arithmetic/div/_idivmod_limb_with_prefix.js - About 1 hr to fix

                  Function _convert has 8 arguments (exceeds 4 allowed). Consider refactoring.
                  Open

                  export default function _convert(f, t, a, ai, aj, b, bi, bj) {
                  Severity: Major
                  Found in src/core/convert/_convert.js - About 1 hr to fix

                    Function _convert_slow has 8 arguments (exceeds 4 allowed). Consider refactoring.
                    Open

                    export default function _convert_slow(f, t, a, ai, aj, b, bi, bj) {
                    Severity: Major
                    Found in src/core/convert/_convert_slow.js - About 1 hr to fix

                      Function _convert_to_smaller_fast has 8 arguments (exceeds 4 allowed). Consider refactoring.
                      Open

                      export default function _convert_to_smaller_fast(br, z, a, ai, aj, b, bi, bj) {
                      Severity: Major
                      Found in src/core/convert/_convert_to_smaller_fast.js - About 1 hr to fix

                        Function _convert_to_larger_fast has 8 arguments (exceeds 4 allowed). Consider refactoring.
                        Open

                        export default function _convert_to_larger_fast(ar, z, a, ai, aj, b, bi, bj) {
                        Severity: Major
                        Found in src/core/convert/_convert_to_larger_fast.js - About 1 hr to fix

                          Function _convert_to_larger_slow has 8 arguments (exceeds 4 allowed). Consider refactoring.
                          Open

                          export default function _convert_to_larger_slow(f, t, a, ai, aj, b, bi, bj) {
                          Severity: Major
                          Found in src/core/convert/_convert_to_larger_slow.js - About 1 hr to fix

                            Function _div_limb_with_prefix has 8 arguments (exceeds 4 allowed). Consider refactoring.
                            Open

                            export default function _div_limb_with_prefix(r, tmp, d, D, Di, Dj, Q, Qi) {
                            Severity: Major
                            Found in src/core/arithmetic/div/_div_limb_with_prefix.js - About 1 hr to fix

                              Function _convert_to_larger has 8 arguments (exceeds 4 allowed). Consider refactoring.
                              Open

                              export default function _convert_to_larger(f, t, a, ai, aj, b, bi, bj) {
                              Severity: Major
                              Found in src/core/convert/_convert_to_larger.js - About 1 hr to fix

                                Function _pow_double_recursive has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                Open

                                export default function _pow_double_recursive(r, x, a, ai, aj, c, ci, cj) {
                                Severity: Major
                                Found in src/core/arithmetic/pow/_pow_double_recursive.js - About 1 hr to fix

                                  Function _convert_to_smaller has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                  Open

                                  export default function _convert_to_smaller(f, t, a, ai, aj, b, bi, bj) {
                                  Severity: Major
                                  Found in src/core/convert/_convert_to_smaller.js - About 1 hr to fix

                                    Function _pow_double has 8 arguments (exceeds 4 allowed). Consider refactoring.
                                    Open

                                    export default function _pow_double(r, x, a, ai, aj, c, ci, cj) {
                                    Severity: Major
                                    Found in src/core/arithmetic/pow/_pow_double.js - About 1 hr to fix

                                      Function _pow_double has a Cognitive Complexity of 9 (exceeds 5 allowed). Consider refactoring.
                                      Open

                                      export default function _pow_double(r, x, a, ai, aj, c, ci, cj) {
                                          assert(r >= 2);
                                          assert(x >= 0);
                                          assert(ai >= 0 && aj <= a.length);
                                          assert(ci >= 0 && cj <= c.length);
                                      Severity: Minor
                                      Found in src/core/arithmetic/pow/_pow_double.js - About 55 mins to fix

                                      Cognitive Complexity

                                      Cognitive Complexity is a measure of how difficult a unit of code is to intuitively understand. Unlike Cyclomatic Complexity, which determines how difficult your code will be to test, Cognitive Complexity tells you how difficult your code will be to read and comprehend.

                                      A method's cognitive complexity is based on a few simple rules:

                                      • Code is not considered more complex when it uses shorthand that the language provides for collapsing multiple statements into one
                                      • Code is considered more complex for each "break in the linear flow of the code"
                                      • Code is considered more complex when "flow breaking structures are nested"

                                      Further reading

                                      Severity
                                      Category
                                      Status
                                      Source
                                      Language