develooper Front page | perl.perl5.porters | Postings from August 2021

Re: Pre-RFC decimal data type

Thread Previous | Thread Next
From:
Craig A. Berry
Date:
August 5, 2021 12:30
Subject:
Re: Pre-RFC decimal data type
Message ID:
CA+vYcVxiMy+XNN9PZV_Eki+4nPwmK-Qw5Hx-na26kkRxVDFJ8Q@mail.gmail.com
On Thu, Aug 5, 2021 at 4:36 AM Nicholas Clark <nick@ccl4.org> wrote:

> Possibly more useful would be a decimal arithmetic library written in C,
> with a suitable licence.

There is the decNumber package in GCC
(<https://github.com/gcc-mirror/gcc/tree/master/libdecnumber>) which
is presumably some version of GPL.  It's also in ICU, which probably
has a more permissive license.

There is something called lipmpdec in Python:
<https://github.com/python/cpython/tree/main/Modules/_decimal/libmpdec>.
It's available independently at
<https://www.bytereef.org/mpdecimal/download.html> and says
"simplified BSD license."

One of the open source SQL databases may have an implementation of the
SQL NUMERIC data type that could be adapted.

Don't really know anything about these -- just did a few minutes of
web searching.

> Also, as there (IIRC) there's now an IEEE spec for decimal types,

It appears to be called x3.274-1996 but costs money from the ANSI store.

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About