Issue Details (XML | Word | Printable)

Key: CORE-2501
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Claudio Valderrama C.
Reporter: Claudio Valderrama C.
Votes: 0
Watchers: 0

If you were logged in you would be able to see more operations.
Firebird Core

Binary shift functions give wrong results with negative shift values

Created: 09/Jun/09 07:38 AM   Updated: 19/Jan/16 06:18 AM
Component/s: Engine
Affects Version/s: 2.1.0, 2.5 Alpha 1, 2.1.1, 2.1.2, 2.5 Beta 1, 2.5 Beta 2, 2.1.3
Fix Version/s: 2.5 Beta 2

Environment: Platform independent
Issue Links:

QA Status: Done successfully

 Description  « Hide
These results are inconsistent, showing that the shift operators in C are designed for non-negative values only:

SQL> select bin_shl(100, -1) from rdb$database;


SQL> select bin_shr(100, -1) from rdb$database;


It seems I will have to put more error messages.

 All   Comments   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
There are no comments yet on this issue.