Sign in to follow this  
Followers 0
NTT123

Autoit Compiler

4 posts in this topic

#1 ·  Posted (edited)

Hi,

First example

------------------------------------------------------------------------------------------------------------------

dim $a,$b,$c

$a=1.00045

$b=1.00021

$c=$a-$b

run("notepad.exe")

WinActivate('Untitled - Notepad')

WinWaitActive('Untitled - Notepad')

send("$c=")

send($c)

-------------------------------------------------------------------------------------------------------------

Output

$c= 0.000240000000000018 wtf, why not 0.00024

Second example

-------------------------------------------------------------------------------------------------------

dim $c

$c=987654321.123456789

run("notepad.exe")

WinActivate('Untitled - Notepad')

WinWaitActive('Untitled - Notepad')

send("$c=")

send($c)

---------------------------------------------------------------------------------------------------------------

Output

$c=987654321.123457 , why not 987654321.123456789

Do you know how to fix this?

Edited by NTT123

Share this post


Link to post
Share on other sites



Thx Managar. Seems all my programs must not have any floating points. Its sad.

Share this post


Link to post
Share on other sites

You can use floating points. You just have to deal with the fact that floating point numbers will have some issues. There are a number of interesting things about floating point values.

Share this post


Link to post
Share on other sites

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  
Followers 0