Jump to content
Sign in to follow this  
gomsun2

Unable to Cast UInt64 to Double on 32bit Compile in Windows 11 ARM: Has Anyone Experienced This?

Recommended Posts

I'm currently working on a MacBook Pro equipped with an M2 chip and using Parallels for virtualization to run Windows 11 ARM. I've encountered a peculiar issue. When I compile for 32bit, I'm not getting the result I anticipate. The code should produce an output of '3.0', but it consistently returns '0'.

Here's a snippet of the code causing the problem:

procedure TMainView.Button3Click(Sender: TObject);
begin
  var LValue: UInt64 := 3;
  Caption := LValue.ToDouble.ToString;
end;

I've found this to be consistent across several Delphi versions, specifically D10, D11, and D12. Has anyone else experienced this issue, or can offer any insight?

Share this post


Link to post
25 minutes ago, Lajos Juhász said:

You should try to debug the code. On an Intel Windows laptop I get the correct result '3'.

When I switch to debugging mode, the evaluation result is still the same. It represents 0.
I don't have an Intel Mac for testing. However, when I asked my coworker to check on theirs, the issue was not replicated.

It seems this might be specific to Mac with the M-series processor running Winodws 11 ARM.

Edited by gomsun2

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×