Re: A Simplified Number System
From: LEE Sau Dan (danlee_at_informatik.uni-freiburg.de)
Date: 11/04/04
- Next message: LEE Sau Dan: "Re: A Simplified Number System"
- Previous message: Martin Reboul: "Re: Back to playing cards"
- In reply to: Sean O'Leathlobhair: "Re: A Simplified Number System"
- Next in thread: Sean O'Leathlobhair: "Re: A Simplified Number System"
- Reply: Sean O'Leathlobhair: "Re: A Simplified Number System"
- Messages sorted by: [ date ] [ thread ]
Date: 04 Nov 2004 18:20:00 +0800
>>>>> "Sean" == Sean O'Leathlobhair <jwlawler@yahoo.com> writes:
Sean> An even more important example is SQL which is the dominant
Sean> database language. In a similar way you may declare types
Sean> such as DECIMAL(11,2).
Sean> The implementer of a particular database is free to choose
Sean> any technique provided it functions correctly.
This is separation of design and implementation.
Sean> A compliant product could be built using scaled integers
Sean> but I am unaware of one. But when the hardware has BCD
Sean> support then this is a good choice and this is very popular.
Sean> What's wrong with BCD? Those familiar with it think it is
Sean> the obvious easy solution and most like the way humans do
Sean> arithmetic (*).
BCD representations are much slower to compute for a computer. You
won't notice the difference for just one or a few operations. But on
a database server serving millions of transactions a day, that can
make a big difference.
Also, the space savings of using scaled integers is tremendous. BCD:
4 bits to represents a decimal digit (log_2 10 = 3.32 bits). That
means 17% of storage space is lost. Again, that's insignificant if
you only consider storing a few thousand digits. But on a database
server with millions time hundreds of digits, that makes a huge
difference. (Using more disk space also means the cache system works
worse, because more space would be accessed.)
So, BCD is a loss both in terms of time and space.
Sean> (*) This is very important in financial applications.
Sean> Auditors do things in a particular human way and will call
Sean> anything else "wrong". It is no good explaining the
Sean> intricacies of computer arithmetic to them.
I can't so why scaled integers can't satisfy this need.
--
Lee Sau Dan +Z05biGVm- ~{@nJX6X~}
E-mail: danlee@informatik.uni-freiburg.de
Home page: http://www.informatik.uni-freiburg.de/~danlee
- Next message: LEE Sau Dan: "Re: A Simplified Number System"
- Previous message: Martin Reboul: "Re: Back to playing cards"
- In reply to: Sean O'Leathlobhair: "Re: A Simplified Number System"
- Next in thread: Sean O'Leathlobhair: "Re: A Simplified Number System"
- Reply: Sean O'Leathlobhair: "Re: A Simplified Number System"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|