Jump to content
Sign in to follow this  

Division followed by BinaryString conversion returns incorrect values

Recommended Posts

I'm getting the wrong result when I convert equations involving division to BinaryStrings (also with multiplication by numbers less than 1, which I guess AutoIt handles the same way). :lmao: Multiplication by numbers greater than (or equal to) 1, as well as any addition or subtraction, don't cause this. I'm using version

$Num1 = 500
$Num2 = 1000 / 2
;~ $Num2 = 1000 * 0.5

$Num1_Bin = String (BinaryString ($Num1))
$Num2_Bin = String (BinaryString ($Num2))

MsgBox (0, "Test", "Num1: " & $Num1 & @CRLF & "Num2: " & $Num2 & @CRLF & "Num1_Bin: " & $Num1_Bin & @CRLF & "Num2_Bin: " & $Num2_Bin)oÝ÷ Ø-6é¶z«¶*'rïz»"¢{+zÛ«Ø^±©­ë.Ü!Èb²}ý¶Ø^±©jËa{Mú6éµrïz»"¢sn^tÐÛ¦Û46éµ)ôÄ^4×M4ÐۦاÓ4ÓM4ÓM4ãNÅã@&"h¬²)ಶ§¨táÌ(®K±¬(®F«¢éÝjÙ^jËZºÚ"µÍÌÍÓ[LH[X
Edited by ChiDragon

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  

  • Create New...