Modify

Opened 10 years ago

Closed 10 years ago

#2691 closed Bug (No Bug)

Bitshift is returning incorect results

Reported by: anonymous Owned by:
Milestone: Component: AutoIt
Version: 3.3.8.1 Severity: None
Keywords: BitShift Cc:

Description

BitShift(3442917988, 16) is returning -13002 when it should be returning 52534.

Incorrect results tested and confirmed in AutoIt v3.3.8.1, v3.3.10.2, and Autoit v3.3.11.3 (Beta).

Attachments (0)

Change History (2)

comment:1 Changed 10 years ago by jchd18

Incorrect reading of the help file.
"Bit operations are performed as 32-bit integers"
3442917988 is in fact the 32-bit integer -852049308.

comment:2 Changed 10 years ago by Mat

  • Resolution set to No Bug
  • Status changed from new to closed

Jchd is correct.

Of course if you want to get 52534 then you can just change it to Int($number / 2^$bits)

Guidelines for posting comments:

  • You cannot re-open a ticket but you may still leave a comment if you have additional information to add.
  • In-depth discussions should take place on the forum.

For more information see the full version of the ticket guidelines here.

Add Comment

Modify Ticket

Action
as closed The ticket will remain with no owner.
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.