Closed PascalLuginbuehl closed 7 years ago
Operator | Usage | |
---|---|---|
Bitwise AND | a & b | |
Bitwise OR | a | b |
Bitwise XOR | a ^ b | |
Bitwise NOT | ~ a | |
Left shift | a << b | |
Sign-propagating right shift | a >> b | |
Zero-fill right shift | a >>> b |
Since charly uses the native Ruby Float type for all Numerics (e.g 3, 3.5, -2.5
) We could try to just interface with these methods.
Charly uses the Float64
type from crystal to represent the Numeric type.
Doing bitwise operations on a floating-point number would work, it just results in complete garbage and is (probably?) useless.
See https://gist.github.com/JadenGeller/aa37541962493138fcc4
This is being worked on on the bitwise-operators
branch