|
|
Subscribe / Log in / New account

GNU MPC 1.0 "Fagus silvatica" released

GNU MPC 1.0 "Fagus silvatica" released

Posted Jul 23, 2012 0:23 UTC (Mon) by pr1268 (guest, #24648)
Parent article: GNU MPC 1.0 "Fagus silvatica" released

arbitrarily high precision and correct rounding of the result

Why do we need another library for complex numbers? Aren't these already supported in GSL and/or GMP? And what about complex.h I found in /usr/include?


to post comments

GNU MPC 1.0 "Fagus silvatica" released

Posted Jul 23, 2012 0:33 UTC (Mon) by josh (subscriber, #17465) [Link] (2 responses)

I don't see any signs of complex number support in GNU MP. The GNU Scientific Library (GSL) does seem to have complex number support; I don't know how it compares to MPC. However, /usr/include/complex.h does not support arbitrary-precision complex numbers, just complex numbers consisting of two floats or doubles.

and Pari/GP

Posted Jul 23, 2012 9:03 UTC (Mon) by rwst (guest, #84121) [Link] (1 responses)

What about libpari? Pari/GP uses GMP for arbitrary integers and floating point arithmetic. And it has its own calculator, gp, for a shell-like environment. It is heavily tested and surely suited for such a task.

and Pari/GP

Posted Jul 23, 2012 18:42 UTC (Mon) by wahern (subscriber, #37304) [Link]

Don't forget that both MPC and MPFR are required to build GCC these days, for constant expression evaluation and for loop optimization (http://gcc.gnu.org/wiki/Graphite-4.8). So, MPC and MPFR are used individually and as dependencies for other modules.

Maybe part of the reason not to use Pari/GP is because it's not organized in a fashion that makes it suitable for all of these different uses.

Also, maybe there's no reason at all. Perhaps it just ended up that one developer used MPC for something, which got used by somebody else, etc. IOW, path dependency.

GNU MPC 1.0 "Fagus silvatica" released

Posted Jul 23, 2012 0:36 UTC (Mon) by jreiser (subscriber, #11027) [Link] (7 responses)

GMP supports arbitrary ["multiple"] precision integers only. GSL supports Complex using pairs of hardware floating point (probably IEEE-754), and provides higher-level mathematical functions and algorithms than <complex.h>. MPC supports Complex using pairs of arbitrary-precision floating point. Thus each of GMP, GSL, MPC has a different target domain.

GNU MPC 1.0 "Fagus silvatica" released

Posted Jul 23, 2012 0:42 UTC (Mon) by josh (subscriber, #17465) [Link] (6 responses)

Thanks for the detail that GSL only uses hardware floating point rather than arbitrary precision.

One detail, though: GNU MP supports arbitrary precision rationals and floats, not just integers.

GNU MPC 1.0 "Fagus silvatica" released

Posted Jul 23, 2012 9:06 UTC (Mon) by rwst (guest, #84121) [Link] (5 responses)

Exactly, and I haven't seen any reason why they couldn't just use libpari.

GNU MPC 1.0 "Fagus silvatica" released

Posted Jul 23, 2012 13:09 UTC (Mon) by jengelh (guest, #33263) [Link]

I can imagine a handful of reasons why PARI was left alone (if it was to be chosen *now*; can't say about "back then").
1. MPC is a GNU project.
2. MPC is LGPL3+, PARI is GPL2 (but even that it conveys in an ambiguous fashion).
3. PARI is not autotoolized.
4. PARI's coding style is not GNU (important for the GNU style police!)
5. Something that I have noticed as a distro-level packager: Scientific software often is subpar in code quality, like breaking strict-aliasing and whatnot.

GNU MPC 1.0 "Fagus silvatica" released

Posted Jul 23, 2012 15:10 UTC (Mon) by coriordan (guest, #7544) [Link] (2 responses)

I don't think the question of "Why not just choose libpari?" ever even presented itself. PARI and MPC both existed, and the latter got donated to the GNU project and so GNU will use it. What's unusual in that?

This is the first release of MPC as a GNU project, so it was originally written independently of the GNU project, so the motives for it being developed in the first place don't come from GNU.

GNU MPC 1.0 "Fagus silvatica" released

Posted Jul 23, 2012 15:56 UTC (Mon) by JohnLenz (guest, #42089) [Link] (1 responses)

I was curious to see how old the projects were, and revision 1 of MPC was January 2003. PARI is a little older at September 1999 but it seems like those early versions of PARI had some wierd non-commercial license. Maybe MPC was started before PARI switched to the GPL? In any case, they are both old projects.

GNU MPC 1.0 "Fagus silvatica" released

Posted Jul 23, 2012 19:27 UTC (Mon) by ballombe (subscriber, #9523) [Link]

PARI/GP first release was in 1986 (before version 1 of the GNU GPL).
The GIT repository start a bit before version 2.0.17 (1999/09/16).
The first release under the GNU GPL was 2.1.0 (2000/11/17).

To cut any speculation: the MPC developers were well-aware of PARI/GP when they decided to write MPC (and conversely, the PARI/GP developers were well-aware of MPC development).

MPC is built on exclusively top of GMP, PARI is not

Posted Jul 23, 2012 16:51 UTC (Mon) by stevenj (guest, #421) [Link]

There is an obvious reason why GNU would adopt MPC rather than PARI: MPC is designed exclusively as an extension of GNU MP and GNU MPFR, whereas PARI has its own multiprecision arithmetic implementation (although it can optionally use GMP). It makes sense for GNU to centralize on a single MP library.

MPC is built on top of GMP

Posted Jul 23, 2012 16:46 UTC (Mon) by stevenj (guest, #421) [Link]

What seems to have been missed in this thread is the fact that MPC is not a competitor for GMP, MPC is built on top of GMP. (See the "Requirements" on the MPC web page.)


Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds