Skip to content

Consider dividing integer weights by their GCD #6

@peteroupc

Description

@peteroupc

While writing a code generator based on the Fast Loaded Dice Roller, I've noticed that two equivalent sets of integer weights (where one is an integer multiple of the other) can have a different table size. For example:

  • One weight set, 1, 9, 6, turns into a 4x5 table by the Fast Loaded Dice Roller.
  • However, an equivalent weight set, 1000, 9000, 6000, turns into a 14x5 table this way.

This shows that it might be helpful in some cases to divide the weights by their greatest common divisor (ignoring zero weights) to achieve an equivalent weight set that minimizes table sizes.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions