Skip to content

Integer // % to_base go through float64: silent wrong answers above 2^53 #149

Closed

Description

@howlcipher

From Motoko's #148 review. (// 123456789012345678 1000) returns ...344, (% MaxInt64 10) gives a false overflow, and MinInt64 // -1 gives CONVERSION_ERROR. Fix: real int64 math, or VALUE_ERROR for |a| >= 2^53. Also: let destructuring with a list of the wrong length silently fills nil or drops items; make it a VALUE_ERROR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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