[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: ecash representation
> In my last article, I slightly screwed up.
>
> A signed 32 bit fixed point number, with two places of precision (less
> than you need when calculating things like interest and what have you,
> but lets be generous) has a maximum representation of even less than I
> off the cuffed -- a mere 21,474,836.48. This is hardly sufficient for
> accounting. However, floating point is even less useful.
>
> .pm
Back in the mid-80's, I worked for several years at Irving Trust,
a (now-gone) major money center bank. One of the financial
messaging systems I worked with stored currency amounts
as 96-bit vectors of a base unit (eg, a penny), and
could have a 'binary point' anywhere in the vector. There were
the usual math functions available to handle this data type.
If you split the vector evenly between fractional and
non-fractional parts, you could represent amounts up to
$7E13 to an accuracy of about 3E-15 of a cent. The maximal
amount that could be represented was about $2E28, and the
highest precision about $1E-29 of a cent.
This range and level of precision was judged adequate of most
purposes :-).
Peter Trei
[email protected]
"Did you know that there is a subunit of the Japanese yen?"