Skip to content

[Zig] Expand Uint type operations #360

@roninjin10

Description

@roninjin10

Summary

Expand Uint type operations in Zig to match TypeScript's 51+ functions per size.

Missing Operations (TS has, Zig lacks exposure)

Arithmetic

  • plus, minus, times, dividedBy, modulo, toPower

Bitwise

  • bitwiseAnd, bitwiseOr, bitwiseXor, bitwiseNot
  • shiftLeft, shiftRight

Analysis

  • bitLength, leadingZeros, popCount, isPowerOf2

Aggregates

  • sum, product, min, max, gcd, lcm

Utilities

  • clone, isZero, isValid

Current State

Zig has generic Uint type but doesn't expose all operations in public API.

Applies To

Uint8, Uint16, Uint32, Uint64, Uint128, Uint256

Note: Issue created by Claude AI assistant, not @roninjin10 or @fucory

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