From: hebisch@math.uni.wroc.pl (Waldek Hebisch)
Subject: Re: Floating Decimal Package/Library?
Date: 19 Jul 2002 14:41:04 GMT
Date: 2002-07-19T14:41:04+00:00 [thread overview]
Message-ID: <ah98e0$mtb$1@panorama.wcss.wroc.pl> (raw)
In-Reply-To: mailman.1027001739.5331.comp.lang.ada@ada.eu.org
Robert C. Leif (rleif@rleif.com) wrote:
: From: Bob Leif
: To: Waldek Hebisch et al.
: The point is NOT speed but is accuracy and understandability. Our
: arithmetic education is based on decimals. Fixed point types including
: decimal types have the problem of not being able to create a type with
: an exponent (delta) value calculated at run-time. Either a user formula
: or a default to the equivalent of floating point could be used for
: calculating the value of the exponent. This probably is a pain for the
: compiler writers. However, one of the virtues of Ada is that the
: compiler writers work to ease the developers' work. A simple example of
: the use of a floating decimal type is spreadsheets, which should be
: based on type decimal.
<snip>
My second claim was that using GMP one can make reasonable implementation
of fixed point arithmetic, it looks that you agree.
My first claim was that floating point is NOT easy to understand
(in your sense): its round-off error is very hard to control.
Especialy in finacial applications decimal floating point have
most of disadvantages of binary arithmetic, with added trap that
on "small" numbers all looks ok, and errors kick in only when you
have many decimal digits. So I think that binary floating point is
easier to understand thentrue decimal floating point, with binary
you get burned early and learn that it is inaccurate, with decimal
you discover errors much later. And for example IBM PL/1 implemnts decimal
floating point just as binary (hexadecimal), while for fixed point uses
special decimal hardware instructions.
In other words, either you give up precise control over rounding
and use floating point, or you specify your rounding policy and use
fixed point. This does not exlude posibility to specify precision
at run-time, you just must prescribe how much precision you need.
--
Waldek Hebisch
hebisch@math.uni.wroc.pl or hebisch@hera.math.uni.wroc.pl
next prev parent reply other threads:[~2002-07-19 14:41 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-12 17:19 Floating Decimal Package/Library? Warren W. Gay VE3WWG
2002-07-12 22:58 ` Robert Wessel
2002-07-12 23:30 ` Dann Corbit
2002-07-15 13:34 ` Warren W. Gay VE3WWG
2002-07-16 5:04 ` Robert C. Leif
2002-07-16 7:01 ` tmoran
2002-07-16 15:50 ` Robert C. Leif
2002-07-17 1:24 ` tmoran
2002-07-17 2:53 ` Robert C. Leif
2002-07-17 4:41 ` tmoran
2002-07-17 16:30 ` Warren W. Gay VE3WWG
2002-07-17 22:09 ` tmoran
2002-07-29 17:05 ` Warren W. Gay VE3WWG
2002-07-29 17:41 ` tmoran
2002-07-30 8:58 ` Jean-Pierre Rosen
2002-07-30 16:20 ` John H. Lindsay
2002-07-16 16:32 ` Pascal Obry
2002-07-16 17:53 ` Warren W. Gay VE3WWG
2002-07-17 1:24 ` tmoran
2002-07-17 8:28 ` Vadim Godunko
2002-07-17 13:32 ` Warren W. Gay VE3WWG
2002-07-22 23:33 ` Robert I. Eachus
2002-07-23 13:16 ` Marin David Condic
2002-07-24 15:18 ` Darren New
2002-07-24 15:43 ` Hyman Rosen
2002-07-24 16:17 ` Fraser Wilson
2002-07-17 13:30 ` Warren W. Gay VE3WWG
2002-07-13 21:55 ` Björn Lundin
2002-07-15 13:37 ` Warren W. Gay VE3WWG
2002-07-17 21:56 ` Waldek Hebisch
2002-07-18 14:13 ` Robert C. Leif
2002-07-19 14:41 ` Waldek Hebisch [this message]
2002-07-19 17:29 ` Warren W. Gay VE3WWG
2002-07-19 21:50 ` Waldek Hebisch
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox