digitalmars.D - GMP (GNU multiple precision) wrapper for D?
- Michael Kiermaier (10/10) Aug 05 2007 Hello,
- Jarrett Billingsley (4/14) Aug 05 2007 All of the Alioth shootout benchmarks for D use GMP, but unfortunately t...
- Don Clugston (4/14) Aug 05 2007 I found I have a copy of it. It'll need work to make it compile with rec...
- Matthias Walter (8/25) Sep 22 2007 Did anyone take the time and port it? If not, I would start a project at...
- Michael Kiermaier (5/36) Sep 22 2007 I don't believe that anyone started a new GMP project for D up to now.
- Don Clugston (4/42) Sep 24 2007 OK, here's Ben Hinkle's sources. But as I said, I don't think it's much ...
- Michael Kiermaier (3/46) Sep 24 2007 Seems that I was totally blind when I copy-and-pasted your email address...
- Witold Baryluk (8/11) Sep 23 2007 This can be helpful:
- dennis luehring (4/4) Sep 23 2007 just a "hypothetical" question
- Matthias Walter (4/10) Sep 23 2007 AFAICS, there is no benefit - syntactically (from the users point of vie...
Hello, I like D more and more. However, one thing I am missing up to now is a D wrapper for GMP (GNU multiple precision library), like the existing C++ wrapper classes. Searching for "D programming gmp" with google gives some pages which link to this homepage: http://home.comcast.net/~benhinkle/ But I cannot find a D wrapper there. Does anybody know about the status of that page? Or is there another GMP project for D? Thanks, ~michael
Aug 05 2007
"Michael Kiermaier" <michael.kiermaier gmx.net> wrote in message news:f95mcl$j7e$1 digitalmars.com...Hello, I like D more and more. However, one thing I am missing up to now is a D wrapper for GMP (GNU multiple precision library), like the existing C++ wrapper classes. Searching for "D programming gmp" with google gives some pages which link to this homepage: http://home.comcast.net/~benhinkle/ But I cannot find a D wrapper there. Does anybody know about the status of that page? Or is there another GMP project for D?All of the Alioth shootout benchmarks for D use GMP, but unfortunately they point to the same (dead) site..
Aug 05 2007
Michael Kiermaier wrote:Hello, I like D more and more. However, one thing I am missing up to now is a D wrapper for GMP (GNU multiple precision library), like the existing C++ wrapper classes. Searching for "D programming gmp" with google gives some pages which link to this homepage: http://home.comcast.net/~benhinkle/ But I cannot find a D wrapper there.I found I have a copy of it. It'll need work to make it compile with recent DMD. But it's very old, and D has improved a lot since then. You might be better just running htod or bcd over the gmp headers.
Aug 05 2007
Don Clugston Wrote:Michael Kiermaier wrote:Did anyone take the time and port it? If not, I would start a project at dsource.org and do it. What about Ben Hinkle's port? Is it active, can one get his sources somewhere? AFAICS, for a port, one would not need to use template metaprogramming like the original authors did in the original gmpxx headers, because classes in D are by reference. Am I right there? At least, for the following examples, there were no unnecessary temporaries: a = b + c; // constructor of mpz_class was called once, so temporary was assigned directly to the new reference a, without copying data. a = (b+c) / (d+e); // constructor was called three times, for (b+c), for (d+e) and for the result. Any ideas or corrections? best regards Matthias WalterHello, I like D more and more. However, one thing I am missing up to now is a D wrapper for GMP (GNU multiple precision library), like the existing C++ wrapper classes. Searching for "D programming gmp" with google gives some pages which link to this homepage: http://home.comcast.net/~benhinkle/ But I cannot find a D wrapper there.I found I have a copy of it. It'll need work to make it compile with recent DMD. But it's very old, and D has improved a lot since then. You might be better just running htod or bcd over the gmp headers.
Sep 22 2007
Matthias Walter Wrote:Don Clugston Wrote:I don't believe that anyone started a new GMP project for D up to now. Don Clugston (dac nospam.com.au) claimed to have a copy of the old code of Ben Hincle. You could try to contact him directly. I would be very happy to see a working GMP wrapper class for D. ~michaelMichael Kiermaier wrote:Did anyone take the time and port it? If not, I would start a project at dsource.org and do it. What about Ben Hinkle's port? Is it active, can one get his sources somewhere? AFAICS, for a port, one would not need to use template metaprogramming like the original authors did in the original gmpxx headers, because classes in D are by reference. Am I right there? At least, for the following examples, there were no unnecessary temporaries: a = b + c; // constructor of mpz_class was called once, so temporary was assigned directly to the new reference a, without copying data. a = (b+c) / (d+e); // constructor was called three times, for (b+c), for (d+e) and for the result. Any ideas or corrections? best regards Matthias WalterHello, I like D more and more. However, one thing I am missing up to now is a D wrapper for GMP (GNU multiple precision library), like the existing C++ wrapper classes. Searching for "D programming gmp" with google gives some pages which link to this homepage: http://home.comcast.net/~benhinkle/ But I cannot find a D wrapper there.I found I have a copy of it. It'll need work to make it compile with recent DMD. But it's very old, and D has improved a lot since then. You might be better just running htod or bcd over the gmp headers.
Sep 22 2007
Michael Kiermaier wrote:Matthias Walter Wrote:OK, here's Ben Hinkle's sources. But as I said, I don't think it's much use. BTW, that's not my real email address. -Don.Don Clugston Wrote:I don't believe that anyone started a new GMP project for D up to now. Don Clugston (dac nospam.com.au) claimed to have a copy of the old code of Ben Hincle. You could try to contact him directly. I would be very happy to see a working GMP wrapper class for D. ~michaelMichael Kiermaier wrote:Did anyone take the time and port it? If not, I would start a project at dsource.org and do it. What about Ben Hinkle's port? Is it active, can one get his sources somewhere? AFAICS, for a port, one would not need to use template metaprogramming like the original authors did in the original gmpxx headers, because classes in D are by reference. Am I right there? At least, for the following examples, there were no unnecessary temporaries: a = b + c; // constructor of mpz_class was called once, so temporary was assigned directly to the new reference a, without copying data. a = (b+c) / (d+e); // constructor was called three times, for (b+c), for (d+e) and for the result. Any ideas or corrections? best regards Matthias WalterHello, I like D more and more. However, one thing I am missing up to now is a D wrapper for GMP (GNU multiple precision library), like the existing C++ wrapper classes. Searching for "D programming gmp" with google gives some pages which link to this homepage: http://home.comcast.net/~benhinkle/ But I cannot find a D wrapper there.I found I have a copy of it. It'll need work to make it compile with recent DMD. But it's very old, and D has improved a lot since then. You might be better just running htod or bcd over the gmp headers.
Sep 24 2007
Don Clugston Wrote:Michael Kiermaier wrote:Seems that I was totally blind when I copy-and-pasted your email address... ~michaelMatthias Walter Wrote:OK, here's Ben Hinkle's sources. But as I said, I don't think it's much use. BTW, that's not my real email address. -Don.Don Clugston Wrote:I don't believe that anyone started a new GMP project for D up to now. Don Clugston (dac nospam.com.au) claimed to have a copy of the old code of Ben Hincle. You could try to contact him directly. I would be very happy to see a working GMP wrapper class for D. ~michaelMichael Kiermaier wrote:Did anyone take the time and port it? If not, I would start a project at dsource.org and do it. What about Ben Hinkle's port? Is it active, can one get his sources somewhere? AFAICS, for a port, one would not need to use template metaprogramming like the original authors did in the original gmpxx headers, because classes in D are by reference. Am I right there? At least, for the following examples, there were no unnecessary temporaries: a = b + c; // constructor of mpz_class was called once, so temporary was assigned directly to the new reference a, without copying data. a = (b+c) / (d+e); // constructor was called three times, for (b+c), for (d+e) and for the result. Any ideas or corrections? best regards Matthias WalterHello, I like D more and more. However, one thing I am missing up to now is a D wrapper for GMP (GNU multiple precision library), like the existing C++ wrapper classes. Searching for "D programming gmp" with google gives some pages which link to this homepage: http://home.comcast.net/~benhinkle/ But I cannot find a D wrapper there.I found I have a copy of it. It'll need work to make it compile with recent DMD. But it's very old, and D has improved a lot since then. You might be better just running htod or bcd over the gmp headers.
Sep 24 2007
Dnia Sat, 22 Sep 2007 07:58:12 -0400 Matthias Walter <walter mail.math.uni-magdeburg.de> napisa=B3/a:Did anyone take the time and port it? If not, I would start a project at dsource.org and do it. What about Ben Hinkle's port? Is it active, can one get his sources somewhere?This can be helpful: http://smp.if.uj.edu.pl/~baryluk/d/onpd/onp/arithmetic/gmp/ --=20 Witold Baryluk, aleph0 MAIL: baryluk smp.if.uj.edu.pl JID: movax jabber.autocom.pl
Sep 23 2007
just a "hypothetical" question should have D direkt bignum support (like for complex numbers) or is there no benefit of having such feature in the language? ciao dennis
Sep 23 2007
dennis luehring Wrote:just a "hypothetical" question should have D direkt bignum support (like for complex numbers) or is there no benefit of having such feature in the language? ciao dennisAFAICS, there is no benefit - syntactically (from the users point of view), handling gmp bignums will be as easy as ints and as there are many complex algorithms, which are partially written in handcrafted assembly (in the GMP library), this won't be a good option. best regards Matthias
Sep 23 2007