Skip to content

Hex float literals juxtaposed with decimal floats #60189

@mhauru

Description

@mhauru
julia> 0x1p3.2
1.6

julia> @code_typed(0x1p3.2)
CodeInfo(
1%1 = Base.mul_float(x, y)::Float64
└──      return %1
) => Float64

julia> 0x1p3 * 0.2
1.6

If I understand the manual correctly then this is unintentional and a bug. At the very least it's very confusing to me. Relates to #16356, where juxtaposing integer hex literals was banned.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIndicates an unexpected problem or unintended behaviorparserLanguage parsing and surface syntax

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions