docs: update Amount haddock
This commit is contained in:
parent
d3083ef316
commit
5018fd459d
@ -10,30 +10,27 @@ A simple amount is a 'Commodity', quantity pair:
|
|||||||
EUR 3.44
|
EUR 3.44
|
||||||
GOOG 500
|
GOOG 500
|
||||||
1.5h
|
1.5h
|
||||||
90apples
|
90 apples
|
||||||
0
|
0
|
||||||
@
|
@
|
||||||
|
|
||||||
A 'MixedAmount' is zero or more simple amounts:
|
An amount may also have a per-unit price, or conversion rate, in terms
|
||||||
|
of some other commodity. If present, this is displayed after \@:
|
||||||
@
|
|
||||||
$50 + EUR 3
|
|
||||||
16h + $13.55 + AAPL 500 + 6 oranges
|
|
||||||
@
|
|
||||||
|
|
||||||
Amounts often have a price per unit, or conversion rate, in terms of
|
|
||||||
another commodity. If present, this is displayed after \@:
|
|
||||||
|
|
||||||
@
|
@
|
||||||
EUR 3 \@ $1.35
|
EUR 3 \@ $1.35
|
||||||
@
|
@
|
||||||
|
|
||||||
A normalised mixed amount has at most one amount in each commodity-price,
|
A 'MixedAmount' is zero or more simple amounts. Mixed amounts are
|
||||||
and no zero amounts (or it has just a single zero amount and no others.)
|
usually normalised so that there is no more than one amount in each
|
||||||
|
commodity, and no zero amounts (or, there is just a single zero amount
|
||||||
|
and no others.):
|
||||||
|
|
||||||
In principle we can convert an amount to any other commodity to which we
|
@
|
||||||
have a known sequence of conversion rates; in practice we only do one
|
$50 + EUR 3
|
||||||
conversion step (eg to show cost basis with -B).
|
16h + $13.55 + AAPL 500 + 6 oranges
|
||||||
|
0
|
||||||
|
@
|
||||||
|
|
||||||
We can do limited arithmetic with simple or mixed amounts: either
|
We can do limited arithmetic with simple or mixed amounts: either
|
||||||
price-preserving arithmetic with similarly-priced amounts, or
|
price-preserving arithmetic with similarly-priced amounts, or
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user