Module

Network.Ethereum.Core.BigNumber

Package
purescript-eth-core
Repository
f-o-a-m/purescript-eth-core

#Algebra Source

class (Ring r, Ring a, LeftModule a r, RightModule a r) <= Algebra a r  where

Members

Instances

#pow Source

pow :: BigNumber -> Int -> BigNumber

Exponentiate a BigNumber

#toString Source

toString :: Radix -> BigNumber -> String

Convert a Big number into a string in the given base

#parseBigNumber Source

parseBigNumber :: Radix -> String -> Maybe BigNumber

Convert a string in the given base to a BigNumber

#toTwosComplement Source

toTwosComplement :: BigNumber -> BigNumber

Take the twos complement of a BigNumer

#unsafeToInt Source

unsafeToInt :: BigNumber -> Int

Unsafely coerce a BigNumber to an Int.

#floorBigNumber Source

floorBigNumber :: BigNumber -> BigNumber

Take the integer part of a big number

Re-exports from Data.Int

#Radix Source

newtype Radix

The number of unique digits (including zero) used to represent integers in a specific base.

#hexadecimal Source

hexadecimal :: Radix

The base-16 system.

#floor Source

floor :: Number -> Int

Convert a Number to an Int, by taking the closest integer equal to or less than the argument. Values outside the Int range are clamped, NaN and Infinity values return 0.

#decimal Source

decimal :: Radix

The base-10 system.

#binary Source

binary :: Radix

The base-2 system.