On Mon, Feb 2, 2015 at 5:22 PM, Pierre CHANSON <chans.pierre@gmail.com> wrote:
Hi everyone, I was wondering if there was a package to manipulate floats like the MPFR library in C...
One issue with MPFR is the licensing, which is GNU. I wonder if Pharo couldn't get a special licence for embedding as "MPFR has continuously been supported by the INRIA <http://www.inria.fr/>...". Pharo is now 32-bit and uses the floatplugin to do the actual fast math. Pharo with the 64-bit system will be able to do better and the float plugin will have to be rewritten anyway. But MPFR could be put into a plugin. As far as I am concerned, I'd rather get something based on GMP ( https://gmplib.org/) but we are there in GNU territory. Which is not what I want for commercial apps. This table: http://www.mpfr.org/mpfr-current/timings.html is showing some LGPL licencing that may be easier to deal with. But for sure, none of that is MIT :-( Phil
Then I found in http://stephane.ducasse.free.fr/Web/Draft/Float.pdf that using ScaledDecimal allows exact arithmetics. So I guess ScaledDecimal is the best class to use for playing with 20 decimals numbers ? :)
Thanks !
Pierre