BitIntegers.jl
BitIntegers.jl copied to clipboard
Fixed-width integers similar to builtin ones
I've been getting performance problems with Shifts regarding BitIntegers less than 128 Bit large. Expected behaviour was no allocations and Type Stability, and after some searching, I think I've found...
Bitshifts for Integers less than 128 Bit in Size were slow and caused allocations, probably due to Typeinstability caused by some interaction of the `@generated shift_call` function. Moving the check...
It would be nice to be able to convert bigendian data, e.g. SHA hashes as in [this discourse thread](https://discourse.julialang.org/t/convert-hash-digest-to-uint256/79307) to `UInt256` etcetera, but this currently fails because `bswap` is not...
:) I noticed that these methods were missing. Thanks for the really handy package!! :) ----------------- Adds methods to `unsigned` and `signed` that take _types_ instead of values. Also extends...
A comment on [stackoverflow](https://stackoverflow.com/questions/57340308/how-does-rusts-128-bit-integer-i128-work-on-a-64-bit-system) implies that one can map big integers such as Int256 to LLVM instructions. I've been trying out BitIntegers, and ran into some cases where it seems...
This seems to be missing so far. The implementation follows that for Julia integers, taking into account that the bit length may not be a power of 2. Strangely, bit...
Sometimes the type is only interpreted as sign or not signed, in that case I try to use something like ```julia @define_integers 32 _ Index32 ``` but then it errors...
``` julia> BitIntegers.@define_integers 8 I8 U8 julia> I8(1) Error showing value of type I8: ERROR: Trunc: output bitsize must be < input bitsize [...] ```
I'd like to create all BitIntegers of byte length up to 1024. I don't want to write 1024 lines of code for that, so I'm trying to use a loop....
It seems that Base no longer defines iseven in terms of isodd.