Proposal for modifying gnucash to use exact quantities

Gary Bickford
Thu, 27 Jul 2000 10:57:45 -0700

This discussion on internal representations reminds me of an idea I had once,
which it turns out some economists have also had - move all money to the 'erg
standard' - like the gold standard except that the fundamental unit of exchange
is the erg.  Energy supplies and real-value prices tend over long periods
(centuries) to follow economic and technology growth - as energy needs rise, so
also technology for acquiring & packaging (generating, mining, drilling,
whatever) and transporting energy advances, so the demand curve after inflation
is fairly static.  This even scales to interplanetary societies, some think.

So I propose using Erg-Units as the fundamental microcurrency - analogously to
64-bit unix time (which can handle all the milliseconds in the lifespan of the
universe), it would then be possible to maintain all possible amounts and units
of money in integer form, even when we are exchanging things with six-eyed
caterpillars from Andromeda.  :O)

Of course, for now, it is not necessary to actually convert to the erg standard,
but only build with approximately the correct scale in mind.  One need only
figure the approximate value of an erg in a single reference currency to get the
scale, then expand to all the rest in the initial snapshot of the currency
exchange database.

Example: I pay 4.6 cents per KWH.  A KWH is 3.6e13 ergs (according to my unix
'units' command), which means the dollar is presently worth about 7.826e14
erg-units in my neighborhood.

In order to scale all the useful range of dollar amounts (or equivalent), let's
use $1billion as the required upper range (for now).  This is $1e9.  In ergs,
this is 7.8e23, which is 5 orders of magnitude too large for 64 bits - 64 bits is
about 18*10^18.  So we have a need to use mega-ergs as the fundamental unit,
providing us with a smallest representable value of $1e-8 and a highest of $1e10,
or $10 billion.  Of course as a currency devalues, the numbers in the currency
may go higher, but the true underlying value won't change.  So what is $10
billion now will be $100 billion later, without problems.

As for the upper range of the representable cash values: The gross asset value of
the planet Earth is perhaps $1e18 (quadrillion, if I did this right), which would
work out to 7.826e32 erg units.   However, I doubt that purchase of a planet will
occur any time soon, so we can anticipate that by then we can just move to 128
bit integers, which will give us plenty of room, with values up to about 1e38
even without the mega-erg scaling factor. This would be enough to purchase many
planets in a package deal.

This is mainly amusing, but it also does represent a reasonable approach.  Build
now with a mega-erg or giga-erg scale factor built into the code, then if/when
128 bit arithmetic becomes standard, a simple recompile will support the change.

Gary B