Skip to content

Unexpected value when constructing a scaled_integer from a literal integer (with Radix != 2) #1050

@bec-ca

Description

@bec-ca

Describe the bug:

I think this piece of code describes it pretty well:

https://godbolt.org/z/T5jPqKa9n

When initializing a radix 10 scaled_integer from a integer literal, I get the wrong value. The issue doesn't seem to happen if radix is 2. Initializing from a double literal seems find on any radix.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions