March Docs
Search…
⌘K
Overview
Modules
▸
FinanceAmount
F
add
F
atoms
F
format
F
from_atoms
F
negate
F
parse
F
quantity_asset
F
rescale
F
sub
▸
FinanceAsset
F
asset
F
asset_id
F
fiat
F
native
F
precision
F
token
▸
FinanceCodec
F
decode
F
encode
▸
FinanceCore
F
add
F
asset
F
asset_id
F
atoms
F
format
F
from_atoms
F
negate
F
parse
F
precision
F
quantity_asset
F
rescale
F
sub
▸
FinanceDate
F
add_days
F
format
F
parse
▸
FinanceError
T
Error
▸
FinanceInteger
F
divmod
▸
FinanceMetadata
F
effective
F
external_id
F
make
F
recorded
F
source
▸
FinanceQuote
F
convert
F
make
F
metadata
▸
FinanceRate
T
Conversion
F
convert
F
convert_report
F
invert
F
make
▸
FinanceRounding
T
Policy
F
divide
F
power10
March Docs
›
FinanceRounding
FinanceRounding
Types
type
Policy
Policy
= Exact | TowardZero | AwayFromZero | Floor | Ceiling | HalfAway | HalfEven
#
Functions
fn
divide
divide(n : BigInt.BigInt, d : BigInt.BigInt, policy :
Policy
) : Result(BigInt.BigInt, FinanceError.Error)
#
Divide signed integers with an explicit policy; denominator must be positive.
fn
power10
power10(places : {Int | _ >= 0 && _ <= 255}) : BigInt.BigInt
#