Skip to content

Low Signed/multiplyFullWidth(by:) sign #102

@oscbyspro

Description

@oscbyspro

I discovered with (#99) that the low sign, formed by Signed/multiplyFullWidth(by:), is inconsistent with every other multiplication operation. I remember thinking that the low part should be positive, because that's how the (high: T, low: T.Magnitude) pattern works. Well, I was wrong. The low and high sign should match, in order for the following operations to yield the same result:

  • *, *=, &*, &*=
  • multiplyFullWidth(by:)
  • multipliedFullWidth(by:)
  • multiplyReportingOverflow(by:)
  • multipliedReportingOverflow(by:)

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugplease fix this :(

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions