Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- count_words_bits :: Word# -> (# Word#, Word# #)
- count_words_bits_int :: Word# -> (# Int#, Int# #)
- bignat_compare :: WordArray# -> WordArray# -> Int#
- bignat_add :: MutableWordArray# s -> WordArray# -> WordArray# -> State# s -> State# s
- bignat_add_word :: MutableWordArray# RealWorld -> WordArray# -> Word# -> State# RealWorld -> State# RealWorld
- bignat_sub_word :: MutableWordArray# RealWorld -> WordArray# -> Word# -> State# RealWorld -> (# State# RealWorld, Bool# #)
- bignat_mul_word :: MutableWordArray# RealWorld -> WordArray# -> Word# -> State# RealWorld -> State# RealWorld
- bignat_mul :: MutableWordArray# RealWorld -> WordArray# -> WordArray# -> State# RealWorld -> State# RealWorld
- bignat_sub :: MutableWordArray# RealWorld -> WordArray# -> WordArray# -> State# RealWorld -> (# State# RealWorld, Bool# #)
- bignat_popcount :: WordArray# -> Word#
- bignat_shiftl :: MutableWordArray# s -> WordArray# -> Word# -> State# s -> State# s
- bignat_shiftr :: MutableWordArray# s -> WordArray# -> Word# -> State# s -> State# s
- bignat_shiftr_neg :: MutableWordArray# s -> WordArray# -> Word# -> State# s -> State# s
- bignat_or :: MutableWordArray# RealWorld -> WordArray# -> WordArray# -> State# RealWorld -> State# RealWorld
- bignat_xor :: MutableWordArray# RealWorld -> WordArray# -> WordArray# -> State# RealWorld -> State# RealWorld
- bignat_and :: MutableWordArray# RealWorld -> WordArray# -> WordArray# -> State# RealWorld -> State# RealWorld
- bignat_and_not :: MutableWordArray# RealWorld -> WordArray# -> WordArray# -> State# RealWorld -> State# RealWorld
- bignat_quotrem :: MutableWordArray# s -> MutableWordArray# s -> WordArray# -> WordArray# -> State# s -> State# s
- bignat_quot :: MutableWordArray# RealWorld -> WordArray# -> WordArray# -> State# RealWorld -> State# RealWorld
- bignat_rem :: MutableWordArray# RealWorld -> WordArray# -> WordArray# -> State# RealWorld -> State# RealWorld
- bignat_quotrem_normalized :: MutableWordArray# s -> MutableWordArray# s -> WordArray# -> State# s -> State# s
- bignat_quotrem_word :: MutableWordArray# s -> WordArray# -> Word# -> State# s -> (# State# s, Word# #)
- bignat_quot_word :: MutableWordArray# s -> WordArray# -> Word# -> State# s -> State# s
- bignat_rem_word :: WordArray# -> Word# -> Word#
- bignat_gcd :: MutableWordArray# s -> WordArray# -> WordArray# -> State# s -> State# s
- bignat_gcd_word :: WordArray# -> Word# -> Word#
- bignat_gcd_word_word :: Word# -> Word# -> Word#
- bignat_encode_double :: WordArray# -> Int# -> Double#
- bignat_powmod_word :: WordArray# -> WordArray# -> Word# -> Word#
- bignat_powmod :: MutableWordArray# RealWorld -> WordArray# -> WordArray# -> WordArray# -> State# RealWorld -> State# RealWorld
- bignat_powmod_words :: Word# -> Word# -> Word# -> Word#
- integer_gcde :: Integer -> Integer -> (# Integer, Integer, Integer #)
- integer_recip_mod :: Integer -> Natural -> (# Natural | () #)
- integer_powmod :: Integer -> Natural -> Natural -> Natural
Documentation
bignat_compare :: WordArray# -> WordArray# -> Int# Source #
:: MutableWordArray# s | Result |
-> WordArray# | |
-> WordArray# | |
-> State# s | |
-> State# s |
:: MutableWordArray# RealWorld | Result |
-> WordArray# | |
-> Word# | |
-> State# RealWorld | |
-> State# RealWorld |
bignat_sub_word :: MutableWordArray# RealWorld -> WordArray# -> Word# -> State# RealWorld -> (# State# RealWorld, Bool# #) Source #
:: MutableWordArray# RealWorld | Result |
-> WordArray# | |
-> Word# | |
-> State# RealWorld | |
-> State# RealWorld |
:: MutableWordArray# RealWorld | Result |
-> WordArray# | |
-> WordArray# | |
-> State# RealWorld | |
-> State# RealWorld |
bignat_sub :: MutableWordArray# RealWorld -> WordArray# -> WordArray# -> State# RealWorld -> (# State# RealWorld, Bool# #) Source #
bignat_popcount :: WordArray# -> Word# Source #
bignat_shiftl :: MutableWordArray# s -> WordArray# -> Word# -> State# s -> State# s Source #
bignat_shiftr :: MutableWordArray# s -> WordArray# -> Word# -> State# s -> State# s Source #
bignat_shiftr_neg :: MutableWordArray# s -> WordArray# -> Word# -> State# s -> State# s Source #
:: MutableWordArray# RealWorld | Result |
-> WordArray# | |
-> WordArray# | |
-> State# RealWorld | |
-> State# RealWorld |
:: MutableWordArray# RealWorld | Result |
-> WordArray# | |
-> WordArray# | |
-> State# RealWorld | |
-> State# RealWorld |
:: MutableWordArray# RealWorld | Result |
-> WordArray# | |
-> WordArray# | |
-> State# RealWorld | |
-> State# RealWorld |
:: MutableWordArray# RealWorld | Result |
-> WordArray# | |
-> WordArray# | |
-> State# RealWorld | |
-> State# RealWorld |
bignat_quotrem :: MutableWordArray# s -> MutableWordArray# s -> WordArray# -> WordArray# -> State# s -> State# s Source #
bignat_quot :: MutableWordArray# RealWorld -> WordArray# -> WordArray# -> State# RealWorld -> State# RealWorld Source #
bignat_rem :: MutableWordArray# RealWorld -> WordArray# -> WordArray# -> State# RealWorld -> State# RealWorld Source #
bignat_quotrem_normalized :: MutableWordArray# s -> MutableWordArray# s -> WordArray# -> State# s -> State# s Source #
Perform quotRem on normalized inputs: * highest bit of B is set * A is trimmed * A >= B * B > 1
:: MutableWordArray# s | Quotient |
-> WordArray# | |
-> Word# | |
-> State# s | |
-> (# State# s, Word# #) |
:: MutableWordArray# s | Quotient |
-> WordArray# | |
-> Word# | |
-> State# s | |
-> State# s |
bignat_rem_word :: WordArray# -> Word# -> Word# Source #
bignat_gcd :: MutableWordArray# s -> WordArray# -> WordArray# -> State# s -> State# s Source #
bignat_gcd_word :: WordArray# -> Word# -> Word# Source #
bignat_gcd_word_word :: Word# -> Word# -> Word# Source #
This operation doesn't really belongs here, but GMP's one is much faster than this simple implementation (basic Euclid algorithm).
Ideally we should make an implementation as fast as GMP's one and put it into GHC.Num.Primitives.
bignat_encode_double :: WordArray# -> Int# -> Double# Source #
bignat_powmod_word :: WordArray# -> WordArray# -> Word# -> Word# Source #
bignat_powmod :: MutableWordArray# RealWorld -> WordArray# -> WordArray# -> WordArray# -> State# RealWorld -> State# RealWorld Source #