Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


What is this "E" on my float value

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking
View previous topic :: View next topic  
Author Message
devAnd
Newbie cheater
Reputation: 0

Joined: 22 Jun 2020
Posts: 13
Location: C#, java and ASM

PostPosted: Fri Aug 13, 2021 1:21 am    Post subject: What is this "E" on my float value Reply with quote

Hi guys!

i would like to know what is this E on my float value:

i.imgur. com/S6CM8Cq.png
Back to top
View user's profile Send private message
Birdi
Expert Cheater
Reputation: 0

Joined: 08 Jun 2020
Posts: 124
Location: Migrating

PostPosted: Fri Aug 13, 2021 1:42 am    Post subject: Reply with quote

Literal: Exponent

2.748099632E-7

is the same as 2.748099632⁻⁷

Most likely found in Doubles, as they're very large numbers.

Edit: DB is more correct here lol


Last edited by Birdi on Fri Aug 13, 2021 3:55 am; edited 1 time in total
Back to top
View user's profile Send private message Visit poster's website
Dark Byte
Site Admin
Reputation: 471

Joined: 09 May 2003
Posts: 25835
Location: The netherlands

PostPosted: Fri Aug 13, 2021 2:46 am    Post subject: Reply with quote

E means the number of digits the comma has to shift to get the actual value
2.748099632E-7 = 0.0000002748099632

_________________
Do not ask me about online cheats. I don't know any and wont help finding them.

Like my help? Join me on Patreon so i can keep helping
Back to top
View user's profile Send private message MSN Messenger
devAnd
Newbie cheater
Reputation: 0

Joined: 22 Jun 2020
Posts: 13
Location: C#, java and ASM

PostPosted: Fri Aug 13, 2021 12:29 pm    Post subject: Reply with quote

If I had to pass this value into a register, what would be the ideal way? for example:

Code:

push eax
mov eax, (float)2.748099632E-7
pop eax


or have any correct form to do this? that way it's not working very well for me.
Back to top
View user's profile Send private message
ParkourPenguin
I post too much
Reputation: 152

Joined: 06 Jul 2014
Posts: 4719

PostPosted: Fri Aug 13, 2021 1:33 pm    Post subject: Reply with quote

If you're just moving around data, the general purpose registers are fine. That instruction assembles correctly for me. You might have trouble with doubles since they require 8 bytes of memory.

If you want to actually do something (add, subtract, multiply...) with floating point numbers, use SSE instructions with xmm registers.
Code:
alloc(newmem,1024)
alloc(value,4)

newmem:
  movss xmm0,[value]
  addss xmm0,[rdi]
  movss [rdi],xmm0
  jmp return

value:
  dd (float)4.0

_________________
I don't know where I'm going, but I'll figure it out when I get there.
Back to top
View user's profile Send private message
devAnd
Newbie cheater
Reputation: 0

Joined: 22 Jun 2020
Posts: 13
Location: C#, java and ASM

PostPosted: Sat Aug 14, 2021 6:01 pm    Post subject: Reply with quote

thanks so much guys !
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> General Gamehacking All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites