Page 1 of 1

About double and float in the memory

Posted: Fri Apr 09, 2021 8:09 am
I have recently started use cheat engine. But got some problem.

1.I found a thing when I browse memory: I can search double values in *0 and *8, but cant find in *4 and *c.

2.Some value i can find : 1f = 1d , 2f = 2d , 3f = 32d , 4f = 512d , 5f = 2048d , How do they convert? How can i calc ?

Re: About double and float in the memory

Posted: Fri Apr 09, 2021 9:19 am
1.: most of the times, values are algned to 4-byte-blocks, meaning *0, *4, *,8, *c.
Doubles are 8 bytes long, so they "skip" 4 and c:)

2: nasty. I prefer letting CE do the job by changing the display type. Perhaps [Link] does the job, did not try it, hehe

Re: About double and float in the memory

Posted: Fri Apr 09, 2021 10:37 am
Marc wrote:
Fri Apr 09, 2021 9:19 am
1.: most of the times, values are algned to 4-byte-blocks, meaning *0, *4, *,8, *c.
Doubles are 8 bytes long, so they "skip" 4 and c:)

2: nasty. I prefer letting CE do the job by changing the display type. Perhaps [Link] does the job, did not try it, hehe
So I just need uncheck "Fast Scan" , got it thank u

I am sorry that English is not my mother tongue. My expression may not be clear enough.

And for the 2. doubles are 8 bytes long floats are 4 bytes let's split it for two part every part got 4 byte
The part2's value of float is 3f e.g
Then double's value will be 32 ( Usually they are all integers , some values like item num skill levels etc)

The question is , if i got a value of double is 2000 , how can i calc the float value of part2 ( with out CheatEngine )