NODE 2f81d384Re: The Crisis with Remailers
Matts Kallioniemi <matts@pi.se>Thu, 23 May 1996 03:41:16 +0800
At 11:58 1996-05-22 +0200, bryce@digicash.com wrote:
>Matts, _floating_ point numbers are _not_ useful
>if you want to handle a number with a lot of precision, nor
>indeed, if you want to be able to _know_ the precision! If you
>have a number that represents money, you want to know the
>precision!
As I said yesterday, there are in fact people dealing with billions
in all major currencies that keep their money in 64 bit floats. The
precision is far better than anything you can do in 32 bit integers.
Trust me, this is a fact and can easily be proven.
>I shall try to refrain from taking umbrage at your comment that
>DigiCash is "not real".
The "get real" was a pun on floats. Many languages, such as Pascal,
calls them real numbers. Sorry I forgot the smiley.
>Also that DigiCash doesn't "do" currency. What could you possibly
>mean by that?
In my client (2.1.5a MT) there is no way to do currency conversion.
If I go to a FIM or DEM merchant I can't buy anything in the store.
This will probably change in the near future when a new client is
released, and then we'll have the question of how to represent these
currencies in one wallet.
What do you think will happen if you have a one italian lira coin and
you try to deposit it with Mark Twain's USD account? With integer
math it won't be pretty.
>For further reading on floating point and other representations
>of numbers in computing, I recommend any good introductory
>university text on mathematical computing. Sorry I don't have
>mine handy or I'd give you a specific reference.
Maybe you should start looking for it. You'll need it when the lira
arrives...
Regards,
Matts
NODE ecf10b10Re: The Crisis with Remailers
bryce@digicash.comThu, 23 May 1996 04:05:39 +0800
-----BEGIN PGP SIGNED MESSAGE-----
Hi again Matts,
This conversation has been thorough enough already that perhaps
it is time to take it off-lists. I think that you are unaware
of the difference between floating point numbers (e.g. the 'IEEE
754' 32 bit floating point number spec) and fixed-point
numbers which are used to represent amounts other than "units"
of a thing. (E.g., use a 32-bit integer and say that it
represents millionths of an apple. You can now represent
anything from 0.000001 apples to 4294.967295 apples with no loss
of precision.)
There are also many other ways to represent different kinds of
numbers, including multi-precision integers and rationals,
imaginary and complex numbers, etc. I reiterate that floating
point numbers are for convenience when dealing with values whose
precision is unimportant. Anyone who encodes real money into
a float is dumb.
> What do you think will happen if you have a one italian lira coin and
> you try to deposit it with Mark Twain's USD account? With integer
> math it won't be pretty.
It will be _very_ pretty. Stay tuned. :-)
Regards,
Bryce
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2i
Comment: Auto-signed under Unix with 'BAP' Easy-PGP v1.1b2
iQB1AwUBMaMp1kjbHy8sKZitAQFlBwMAwhwLBvPvKMwjzWMj/HMDrzlws9CRwPxd
ylBIIWCnaChUafO9Gbjptd12A+nRlwgMJ27N+aY5GCcUu6jlVZz2j7jtxOqMMwNm
VFHs0itk7hotPGAoFBF4i4iB0YG1C0Ih
=y5zo
-----END PGP SIGNATURE-----
NODE 45bd041aRe: The Crisis with Remailers
R.Hirschfeld@cwi.nlThu, 23 May 1996 07:41:00 +0800
Despite the ugliness of floating point arithmetic (lack of
associativity, for example) and my general distaste for it, I would
have to agree that 64-bit floats are higher precision than 32-bit
fixed-points, since more than half the bits are mantissa.
Do major currency traders really store money as 64-bit floats? It
surprises me.
By the way, I thought the "get real" pun was funny and not at all
disparaging. But I hope that "get rational" is good enough for
currency exchange.
NODE 45fd7084Re: The Crisis with Remailers
"Perry E. Metzger" <perry@piermont.com>Thu, 23 May 1996 16:33:54 +0800
R.Hirschfeld@cwi.nl writes:
> Despite the ugliness of floating point arithmetic (lack of
> associativity, for example) and my general distaste for it, I would
> have to agree that 64-bit floats are higher precision than 32-bit
> fixed-points, since more than half the bits are mantissa.
However, accounting systems DO NOT use 32 bit fixed point arithmetic.
One client of mine had around $10Billion under management. Do you
think they were doing their accounting on a system that could only
deal with fixed point numbers of 45Million or so? Hell, individual
trades are larger.
Floating point systems are built to do approximate math on a very wide
range of number sizes. Accounting systems require exact math -- down
to the cent. Floats aren't suitable.
Anyone who needs to understand why should go off and read Knuth,
Volume 2.
{erru
NODE da1dd04aRe: The Crisis with Remailers
R.Hirschfeld@cwi.nlThu, 23 May 1996 10:57:40 +0800
> Date: Wed, 22 May 1996 15:04:04 -0400
> From: "Perry E. Metzger" <perry@piermont.com>
>
> Floating point systems are built to do approximate math on a very wide
> range of number sizes. Accounting systems require exact math -- down
> to the cent. Floats aren't suitable.
I completely agree. But are the usual fixed-point representations
adequate for exchange rates, where it's not a matter of "down to the
cent" but of ratios of cents and centimes? Is an exact representation
of rationals (e.g., pairs of integers) needed?
NODE 4d16a762Re: The Crisis with Remailers
"Perry E. Metzger" <perry@piermont.com>Thu, 23 May 1996 10:41:12 +0800
R.Hirschfeld@cwi.nl writes:
> > Date: Wed, 22 May 1996 15:04:04 -0400
> > From: "Perry E. Metzger" <perry@piermont.com>
> >
> > Floating point systems are built to do approximate math on a very wide
> > range of number sizes. Accounting systems require exact math -- down
> > to the cent. Floats aren't suitable.
>
> I completely agree. But are the usual fixed-point representations
> adequate for exchange rates, where it's not a matter of "down to the
> cent" but of ratios of cents and centimes?
It depends on the number of significant figures you need to
represent. Forex usually involves numbers with five significant
figures, which can be represented fairly conveniently in fixed point.
Perry
NODE d150a713Re: The Crisis with Remailers
mpd@netcom.com (Mike Duvos)Thu, 23 May 1996 11:01:24 +0800
Perry Writes:
> Floating point systems are built to do approximate math on a very wide
> range of number sizes. Accounting systems require exact math -- down
> to the cent. Floats aren't suitable.
Calling floating point math "approximate" is a bit of a misnomer.
Floating point numbers all correspond to exact points on the real
number line. The floating point number taken as the result of an
operation, if that result is not another floating point number, is
always chosen consistantly in a way which has minimum error and zero
bias.
Floating point numbers can be used to do exact integer arithmetic
quite easily. A 48 bit mantissa can represent 14 decimal digit signed
integers with no loss of precision, and $999,999,999,999.99 is more
than enough magnitude for most bean counters.
--
Mike Duvos $ PGP 2.6 Public Key available $
mpd@netcom.com $ via Finger. $
NODE 84a9832fRe: The Crisis with Remailers
"Paul S. Penrod" <furballs@netcom.com>Thu, 23 May 1996 14:15:27 +0800
On Wed, 22 May 1996, Mike Duvos wrote:
> Perry Writes:
>
> > Floating point systems are built to do approximate math on a very wide
> > range of number sizes. Accounting systems require exact math -- down
> > to the cent. Floats aren't suitable.
>
> Calling floating point math "approximate" is a bit of a misnomer.
> Floating point numbers all correspond to exact points on the real
> number line. The floating point number taken as the result of an
> operation, if that result is not another floating point number, is
> always chosen consistantly in a way which has minimum error and zero
> bias.
If floating point is implemented properly in *both* hardware and
software, then the claim is valid. I have seen too many instances of
floating point support and/or emulation from people like MS and Borland
that would scare the bejeebers out of most competent programmers
>
> Floating point numbers can be used to do exact integer arithmetic
> quite easily. A 48 bit mantissa can represent 14 decimal digit signed
> integers with no loss of precision, and $999,999,999,999.99 is more
> than enough magnitude for most bean counters.
>
Again, exact integer artimetic derived from floating point is dependant
on how well the floating point "behaves". Mainframes dont suffer the same
fate as some of the uP's do.
> --
> Mike Duvos $ PGP 2.6 Public Key available $
> mpd@netcom.com $ via Finger. 7 $
>
>
>
-------------------------------------------------------------------------
"Faced with the choice between changing one's mind and proving that there
is no need to do so, almost everybody gets busy on the proof"
-- John Kenneth Galbraith
"Success is attending a funeral as a spectator"
-- E. BonAnno
-------------------------------------------------------------------------
NODE c6e47790Re: The Crisis with Remailers
jonathon <grafolog@netcom.com>Thu, 23 May 1996 17:49:32 +0800
Mike:
On Wed, 22 May 1996, Mike Duvos wrote:
> quite easily. A 48 bit mantissa can represent 14 decimal digit signed
> integers with no loss of precision, and $999,999,999,999.99 is more
> than enough magnitude for most bean counters.
Not when that bean counter is a judge chasing down the
$ 999 999 999 999.999 999 decimal, for an interest rate
calculation. << You try defending that one to a judge
who is looking for a reason to dismiss your case, with
prejudice. >>
xan
jonathon
grafolog@netcom.com
**********************************************************************
* *
* Opinions expressed don't necessarily reflect my own views. *
* *
* There is no way that they can be construed to represent *
* any organization's views. *
* *
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
* *
* http://members.tripod.com/~graphology/index.html *
* *
***********************************************************************
NODE 52fe8113Re: The Crisis with Remailers
"Perry E. Metzger" <perry@piermont.com>Thu, 23 May 1996 08:48:28 +0800
Matts Kallioniemi writes:
> What do you think will happen if you have a one italian lira coin and
> you try to deposit it with Mark Twain's USD account? With integer
> math it won't be pretty.
Fixed point math is not ugly. It is the only way to go if you are
representing currency and thus cannot afford loss of precisions -- and
isn't particularly onerous to use.
Perry