Skip to content

rounding 9.9 gives improper coefficient #191

@lx-0

Description

@lx-0

When rounding Big('9.9'), the resulting Big object will be:

Big {
  s: 1,
  e: 1,
  c: [ 1, '-1': NaN ],
  constructor: [Function: Big] {
    DP: 20,
    RM: 1,
    NE: -7,
    PE: 21,
    strict: true,
    roundDown: 0,
    roundHalfUp: 1,
    roundHalfEven: 2,
    roundUp: 3,
    Big: [Circular],
    default: [Circular]
  }
}

The index -1 of c is NaN.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions