The way how I create my mpf_class effects the result after a arithmetic operation
haberg-1 at telia.com
Thu Jan 29 09:52:27 UTC 2015
> On 29 Jan 2015, at 01:30, Case Van Horsen <casevh at gmail.com> wrote:
> On Wed, Jan 28, 2015 at 2:02 PM, Hans Aberg <haberg-1 at telia.com> wrote:
>>> On 28 Jan 2015, at 18:09, H8H <h8h at dev-nu11.de> wrote:
>>> I see that i.e. python has the same behaviour:
>> That may be the case because they use the GMP, MPFR and MPC libraries! :-)
> The Decimal type in Python is a true radix-10 floating point type.
> Early versions were written in Python but later versions are
> implemented in C. 64-bit binary values are converted exactly by
> creating a result with 53 decimal digits of precision. If an
> representation error is introduced when the 64-bit value was created,
> it will be propagated to the Decimal value.
I built a computer in the 1970s which had a Basic with decimal numbers, I think, but I was not aware of that such a data type was still in use. Python originates from the 1980s, though.
> Support for the GMP, MPFR, and MPC libraries are provided by gmpy2
> library which I maintain.
I saw it.
More information about the gmp-discuss