comp.lang.ada
 help / color / mirror / Atom feed
From: Mike H <postmaster@ada-augusta.demon.co.uk>
Subject: Re: A curiosity about decimal fixed point types...
Date: Mon, 11 Nov 2013 17:06:31 +0000
Date: 2013-11-11T17:06:31+00:00	[thread overview]
Message-ID: <rp9C94IX6QgSFw0T@ada-augusta.demon.co.uk> (raw)
In-Reply-To: 7d4f2e0c-0aed-4ba3-aa5a-0c2bc0c2c5a0@googlegroups.com

In message <7d4f2e0c-0aed-4ba3-aa5a-0c2bc0c2c5a0@googlegroups.com>, 
mockturtle <framefritti@gmail.com> writes
>Dear all,
>just a silly curiosity about decimal fixed point types, e.g.,
>
> type Euro is delta 0.01 digits 20;
> -- Would be 20 enough? :-)
>
>Are they currently used? Where? Since most of the examples are about 
>money (mine and RM's) included, I guess that they were thought for 
>financial applications, but I am unsure if nowadays financial software 
>uses this type of types or just floating point.
Having worked in financial areas before moving into Ada, I would suggest 
that accumulations of rounding errors are a potential mine field for the 
honest and a potential gold mine for the dishonest! In consequence 
rigorous algorithm specification is far more important than most people 
would expect.

Perhaps the ideal is to work in integers (exact figures of the lowest 
denomination of the coinage - pence, cents or w.h.y). But of course, too 
often this is not possible (e.g. currency conversions and discount 
rates) and that is when the problems really start.
-- 
Mike
"Homo sum, humani nihil a me alienum puto" =
"I am human, (so) I (should) judge nothing of humanity to be strange."
Publius Terentius (195/185–159 BC)

  reply	other threads:[~2013-11-11 17:06 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-11 15:04 A curiosity about decimal fixed point types mockturtle
2013-11-11 17:06 ` Mike H [this message]
2013-11-11 18:54 ` Oliver Kleinke
2013-11-11 19:58 ` AdaMagica
2013-11-12 12:31 ` Jacob Sparre Andersen
2013-11-14 13:12   ` Marius Amado-Alves
2013-11-14 14:20     ` gautier_niouzes
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox