Skip to content

Add --round-leaves option to auto-pad leaf count to nearest arity^n #181

@carpalsgrabby

Description

@carpalsgrabby

Summary

Sometimes users want to know the nearest valid full-tree leaf count without manually calculating it. The script computes fullLeaves, but doesn’t provide an option to round the user’s input automatically.

Proposal

  • Add --round-leaves flag.
  • Instead of requiring user input for leaves, compute:
    • rounded_up = arity**ceil(log(leaves, arity))
    • rounded_down = arity**floor(log(leaves, arity))
  • Print both possibilities.

Benefit

Useful for designing commitment systems or memory layouts that must align to exact powers of arity.

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