Skip to content

Inconsistent Double to UInt64 conversion on ARM vs x64 Architectures #94922

Closed
@OceanOak

Description

@OceanOak

Description

When converting the double value 1.8446744073709552E+19 to a uint64, the result of the conversion changes based on the architecture

Reproduction Steps

In dotnet fsi run
uint64(1.8446744073709552E+19);;

Expected behavior

The conversion of 1.8446744073709552E+19 to uint64 should be consistent across different architectures

Actual behavior

  • On ARM architecture: uint64(1.8446744073709552E+19) = 18446744073709551615.
  • On x64 architecture: uint64(1.8446744073709552E+19) = 0

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions