ChiDragon Posted October 11, 2006 Share Posted October 11, 2006 (edited) 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). Multiplication by numbers greater than (or equal to) 1, as well as any addition or subtraction, don't cause this. I'm using version 3.2.0.1. $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Ý÷ Ø-Mú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 Ý[È ÌÍÓ[LJ Edited October 11, 2006 by ChiDragon Link to comment Share on other sites More sharing options...
Moderators SmOke_N Posted October 11, 2006 Moderators Share Posted October 11, 2006 What about $Num2 = Int(1000 / 2) what does that do? Common sense plays a role in the basics of understanding AutoIt... If you're lacking in that, do us all a favor, and step away from the computer. Link to comment Share on other sites More sharing options...
ChiDragon Posted October 11, 2006 Author Share Posted October 11, 2006 That gives the right value but padded with 8 extra zeroes at the end. Int(500) doesn't include the padding. Link to comment Share on other sites More sharing options...
ChiDragon Posted October 14, 2006 Author Share Posted October 14, 2006 Should I repost this in Bug Reports? Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now