Skip to content

Float % and // wrong with huge operands; #150 follow-up nits #151

Closed

Description

@howlcipher

From Motoko's #150 review. This happens on base too: (% MaxInt64 1e33) gives 1.0000000000000092e+33, and // gives -1.

Nits:

  • The error text for non-numeric operands to % and // is now '< compares incompatible types'.
  • The destructure VALUE_ERROR has no line or column.
  • Document the instruction cost: about 2.3x for small % and //, 13.4k for to_base at MinInt64 in base 2.
  • The construct-table notes still say 'via to_int(/)'.
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