Skip to content

uint256.mulDiv(MAX, MAX, MAX) wrong at the u256 boundary #81

Description

@koko1123

Discovered via the test-harness fix. mulDiv(MAX, MAX, MAX) should equal MAX but returns a few bits short. The 512-bit intermediate/division path has an edge-case error at the u256 maximum. mulDiv is a benchmarked DEX hot path; typical inputs are fine, boundary is wrong. Test quarantined with error.SkipZigTest pointing here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions