JonY - well, mine is in Fortran 95 structured format, with layers of classes
and derived data types.  An experienced programmer could port it to C++
fairly quickly, giving you a a C++ class with overloaded arithmetic and
casting/data conversion operations.  But I'm not a C++ programmer and don't
want to become one; I'm not in software or computer science and have other
plans for my time than gaining expertise in C++.  But I would be happy to
support other people to do the conversion to C++.

The Numerical Recopies core utilities are extended-precision fixed-point
arithmetic without extensions (I do the extensions myself), an algorithm to
compute pi to arbitrary precision, and an algorithm to do multiplication
using an FFT to convolve polynomials of integers that are the extended
precision mantissas broken up into bytes.  The multiplication and division
algorithms are non-trivial and the computer science in them is very much key
to acceptable speeds in multiplication.  If you guys are at all serious
about this I will approach the NR people about how to proceed.  My tentative
thinking has been to put out what I have under the GPL, MIT, BSD or whatever
license and note the NR modules needed to complete the package and leave it
at that.  For something to become a package in another language, I need a
release into the MIT or BSD license.  That's not at all very different from
what they offer in the books and CD, so I think that it might be
forthcoming, particularly if a plug for NR is included, but at this late
date even that might not be required.

My package has an initialization routine that sets up all the transcendental
functions in arbitrary precision - log, exp, sine, cosine, tangent, arc
sine, arc cosine, arc tangent - one and two argument - and a couple of
others like the log gamma function.  All of that is mine and free for me to
release in any license.

James K Beard

-----Original Message-----
From: Jon [mailto:[email protected]] On Behalf Of JonY
Sent: Saturday, April 09, 2011 9:07 PM
To: [email protected]; [email protected]
Cc: James K Beard
Subject: Re: [Mingw-w64-public] mingw-w64 Decimal Floating Point math

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On 4/10/2011 01:54, James K Beard wrote:
> I think the long term solution is to implement the decimal arithmetic 
> keywords with an open mind.  Special requirements, like extremely long 
> decimal words (DECIMAL128 == 128 digits?????) may require 
> multiple-precision arithmetic, which may be problematic because most 
> compilers support up to quad precision floating point, which is 128 
> bits with 12 bits exponent and
> 116 bits mantissa, or about 35 decimal digits.
> 

DECIMAL128 has an epsilon of 1E-33DL, I guess that means the first 33 digits
after the decimal point has to be free from rounding errors.

> If financial calculations were all that was required, that would be 
> enough for practical use, because overflow would be at 10^33 
> dollars/yen/pesos/yuan/whatever.  Nothing in real-world finance 
> requires more dynamic range.
> 
> But, nothing in nature requires more than about 10^125, which is the 
> ratio of the densities of intergalactic space and the interior of a 
> neutron star, or the time in years for the universe to reach total 
> heat death and an overall homogeneous thermal composition.  That's why 
> IEEE floating points overflow at 10^38 or, for more than 32 bits, 10^308.
> 
> I have a multiple precision package that I use for personal work that, 
> for software convenience and best speed, uses a signed 16-bit integer 
> for the exponent and overflows at 10^9863.  I've been thinking about 
> releasing it under the GPL but there is a lot of code cleanup needed, 
> and some core modules are from Numerical Recipes for Fortran 90 and 
> will require another license that I haven't pursued.
> 
> James K Beard
> 

I've talked with Kai sometime ago about licensing, GPL and LGPL aren't
practical for mingw-w64, if it were, I would have taken libdecnumber and
libquadmath from gcc directly.

He opted for a MIT or BSD type license so mingw-w64 could still be used to
develop proprietary software.

I did find one with BSD license, nice decimal float support too, but its
build system is so horrendous that it takes more work to fix it than actual
programming.


-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.16 (MingW32)

iEYEARECAAYFAk2hAq0ACgkQp56AKe10wHeFZgCfQmo3NY64k/xltDCjK438gkDj
0UAAnAk42s3/1BuA24FfGal6kbncF8uF
=H47M
-----END PGP SIGNATURE-----



------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
Mingw-w64-public mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mingw-w64-public

Reply via email to