BigInt
                                
                                
                                
                                    BigInt copied to clipboard
                            
                            
                            
                        Signed bitwise shift
Signed bitwise shift doesn't work.
Example:
Int(65764) >> 16   // gives 1
Int(-65764) >> 16   // gives -2
BigInt(65764) >> 16   // gives -1
BigInt(-65764) >> 16   // gives -1, must be -2
                                    
                                    
                                    
                                
Thanks for brining this up. Our Signed Big Integer implementation uses a sign bit and an unsigned magnitude. When we perform a right shift on a BigInt we basically just shift the magnitude right.
In contrast, right shifting Int is a right shift on the Two's complement representation of that integer, where the top most bits are filled with ones.
The behavior of a right shift of negative integers is in theory implementation dependent. Though I think it could be beneficial for the BigInt implementation to behave like the Swift Int implementation (and the majority of other implementations e.g. python, ...).