473,699 Members | 2,697 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

gmpy 1.01 rc near... anybody wanna test>

I have fixed almost all of the outstanding bugreports and feature
request for gmpy: divm doesn't leak memory any more, truediv and
floordiv are implemented for all types, etc -- in the current CVS
version (one thing I must still look at is divm's behavior when its args
are not mutually prime). It currently compiles w/o warnings, and passes
all of its 1040+ tests, w/the current release of GMP (4.1.4), Python
(2.4.2), MacOSX (10.4.3), XCode (2.1), gcc (4.0).\\

gmpy users able to download and build from sourceforge's cvs are
encouraged to test the current CVS version. This is a great time to
send me any bug reports or (minor;-) feature requests, since I hope to
release a "1.01 release candidate" of gmpy ASAP. I'm currently unable
to build any Windows version -- any volunteer for THAT task is doubly
welcome;-).
Thanks,

Alex
Nov 7 '05 #1
22 1949
I downloaded and tried the CVS version. Division still didn't work as
expected.
import gmpy
gmpy.version() '1.01' gmpy.mpz(9)//gmpy.mpz(4) Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: unsupported operand type(s) for //: 'mpz' and 'mpz' from __future__ import division
gmpy.mpz(9)//gmpy.mpz(4) Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: unsupported operand type(s) for //: 'mpz' and 'mpz' gmpy.mpz(9)/gmpy.mpz(4) Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: unsupported operand type(s) for /: 'mpz' and 'mpz'


Platform: Solaris 10 x86, SunStudio compiler, GMP 4.1.4, Python 2.4.2

Nov 7 '05 #2
Alex Martelli wrote:
I have fixed almost all of the outstanding bugreports and feature
request for gmpy: divm doesn't leak memory any more, truediv and
floordiv are implemented for all types, etc -- in the current CVS
version (one thing I must still look at is divm's behavior when its args
are not mutually prime). It currently compiles w/o warnings, and passes
all of its 1040+ tests, w/the current release of GMP (4.1.4), Python
(2.4.2), MacOSX (10.4.3), XCode (2.1), gcc (4.0).\\

gmpy users able to download and build from sourceforge's cvs are
encouraged to test the current CVS version. This is a great time to
send me any bug reports or (minor;-) feature requests, since I hope to
release a "1.01 release candidate" of gmpy ASAP. I'm currently unable
to build any Windows version -- any volunteer for THAT task is doubly
welcome;-).

I tried compiling it with the MS free toolkit but the C compile
complains about the absence of "gmp.h". Since I see such a header in my
Cygwin installation I presume it's something that a full VC7
installation could expect to be present.

Unfortunately modifying the build to use the Cygwin include directory
gave errors, I suspect because other Cygwin headers were also being
picked up in error (I just added /cygwin/usr/include to include_dirs.

Compilation ran to completion with the header files from both Cygwin and
the GNU gmp-static library, but then of course in both cases I was
missing the gmp library to link it against.

So I'm afraid you might need someone with access to VC to test this on
Windows for you, sorry.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/

Nov 7 '05 #3
al***@mail.comc ast.net (Alex Martelli) writes:
gmpy users able to download and build from sourceforge's cvs are
encouraged to test the current CVS version.


Oh cool, I wondered whether any gmpy maintenance was still going on.
I'll see if I can give the new version a try.
Nov 7 '05 #4
Steve Holden <st***@holdenwe b.com> wrote:
...
I tried compiling it with the MS free toolkit but the C compile
complains about the absence of "gmp.h". Since I see such a header in my
Cygwin installation I presume it's something that a full VC7
installation could expect to be present.
gmp.h is the header of GMP, the GNU library that gmpy wraps. It appears
to be preinstalled on Cygwin, from what you mention, but I'm pretty sure
Microsoft doesn't preinstall GPL-covered libraries from GNU with THEIR
stuff... a suitable Windows version need to be procured and installed in
some other way (having no Windows around I'm hard put to suggest what is
the best way to do this these days).
So I'm afraid you might need someone with access to VC to test this on
Windows for you, sorry.


Tx for the attempt, but I don't think VC per se will suffice -- somebody
needs to build or find a suitable version of GMP for Windows, too.
Alex
Nov 7 '05 #5
<ca****@comcast .net> wrote:
I downloaded and tried the CVS version. Division still didn't work as
expected.


Now that's truly interesting...
import gmpy
gmpy.version() '1.01' gmpy.mpz(9)//gmpy.mpz(4) Traceback (most recent call last):
File "<stdin>", line 1, in ?
TypeError: unsupported operand type(s) for //: 'mpz' and 'mpz'


while, on my machine:

Helen:~/gmpy/test alex$ python
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright" , "credits" or "license" for more information.
import gmpy
gmpy.mpz(9)//gmpy.mpz(4) mpz(2)
etc, etc.

The CVS commit which I did before the post you're replying to gave me:

....
Checking in src/gmpy.c;
/cvsroot/gmpy/gmpy/src/gmpy.c,v <-- gmpy.c
new revision: 1.14; previous revision: 1.13
done
Mailing gm**********@li sts.sourceforge .net...
Generating notification message...
Generating notification message... done.

and the logfile should be...:
Helen:~/gmpy alex$ cvs log src/gmpy.c | head -20
al***@cvs.sourc eforge.net's password:

RCS file: /cvsroot/gmpy/gmpy/src/gmpy.c,v
Working file: src/gmpy.c
head: 1.14
branch:
locks: strict
access list:
symbolic names:
import_release: 1.1.1.1
import_vendor: 1.1.1
keyword substitution: kv
total revisions: 15; selected revisions: 15
description:
----------------------------
revision 1.14
date: 2005/11/07 05:29:24; author: aleax; state: Exp; lines: +83 -2

Add floordiv and truediv implementations to mpz, mpq, mpf (unittests
still need to be added).
----------------------------
revision 1.13
....
Unfortunately, I didn't have a CVS $Id$ in gmpy.c (silly me!) so
checking that you have the right version was hard. I have now added it,
and an accessor to it from Python:

Helen:~/gmpy/test alex$ python
Python 2.4.1 (#2, Mar 31 2005, 00:05:10)
[GCC 3.3 20030304 (Apple Computer, Inc. build 1666)] on darwin
Type "help", "copyright" , "credits" or "license" for more information. import gmpy
gmpy._cvsid() '$Id: gmpy.c,v 1.15 2005/11/07 15:43:24 aleax Exp $'


Can you cvs update again and check what's going on? Thanks!
Alex
Nov 7 '05 #6
Paul Rubin <http://ph****@NOSPAM.i nvalid> wrote:
al***@mail.comc ast.net (Alex Martelli) writes:
gmpy users able to download and build from sourceforge's cvs are
encouraged to test the current CVS version.
Oh cool, I wondered whether any gmpy maintenance was still going on.


Only when I get guilt-tripped into working a bit on it;-). gmpy as it
stands mostly meets my modest personal needs, but I'd still like to keep
it useful to others, too, of course.
I'll see if I can give the new version a try.


Thanks. The floordiv and truediv still need tests, and there's a
mysterious report of them not working at all (which I suspect is due to
a cvs update somehow going awry -- I've now added a gmpy._cvsid()
accessor to return the CVS $Id$ string to facilitate checking for such
issues); divm shouldn't leak memory any more, but still fails when
arguments aren't mutually prime (haven't looked into that yet). I will
be working on these issues presently.

I haven't even looked at what's new in GMP 4.1.4 to see if there's
anything there which I should wrap in gmpy (or use to reimplement some
of gmpy's existing functionality in a more optimized way...). I'm open
to suggestions for any such minor features or optimizations, although my
main goal for 1.01 is to remove bugs and leaks -- any _major_ new
feature will have to wait for a future 1.1 or whatever...

Current gmpy's biggest single issue right now is that I can't build it
on Windows, having no Windows machine, and even less any GMP 4.1.4 for
Windows...
Alex
Nov 7 '05 #7
Alex Martelli wrote:
Steve Holden <st***@holdenwe b.com> wrote:
...
I tried compiling it with the MS free toolkit but the C compile
complains about the absence of "gmp.h". Since I see such a header in my
Cygwin installation I presume it's something that a full VC7
installatio n could expect to be present.

gmp.h is the header of GMP, the GNU library that gmpy wraps. It appears
to be preinstalled on Cygwin, from what you mention, but I'm pretty sure
Microsoft doesn't preinstall GPL-covered libraries from GNU with THEIR
stuff... a suitable Windows version need to be procured and installed in
some other way (having no Windows around I'm hard put to suggest what is
the best way to do this these days).

So I'm afraid you might need someone with access to VC to test this on
Windows for you, sorry.

Tx for the attempt, but I don't think VC per se will suffice -- somebody
needs to build or find a suitable version of GMP for Windows, too.

Yes indeed. I took a look at the gmplib source distro, but it would mean
installing way too much other stuff to be practical right now,
unfortunately.

As a consolation prize you might like to know that it appears to build
and pass all tests happily under Cygwin. Sorry I can't be more help.

regards
Steve
--
Steve Holden +44 150 684 7255 +1 800 494 3119
Holden Web LLC www.holdenweb.com
PyCon TX 2006 www.python.org/pycon/

Nov 7 '05 #8
Everything works fine with v1.16. I'm sure I was doing something wrong.
I shouldn't be testing that late at night. ;-)

It looks like the warning about "tp_compare " has been fixed.

I will try to build a version for Windows, but that may take me a day
or two.

Thanks for the updates to gmpy!

Case

Nov 8 '05 #9
<ca****@comcast .net> wrote:
Everything works fine with v1.16. I'm sure I was doing something wrong.
I shouldn't be testing that late at night. ;-)

It looks like the warning about "tp_compare " has been fixed.
I didn't touch tp_compare specifically, so the fix must have been a side
effect (?).

I will try to build a version for Windows, but that may take me a day
or two.
Great, pls let me know when you do (particularly if you're willing to
make your build available to others -- if you send it to me I can make
it downloadable from sourceforge).

Thanks for the updates to gmpy!


You're welcome, and thank YOU for the feedback &c.
Alex
Nov 8 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
6822
by: Christian Schmidbauer | last post by:
Hello! I prepare my XML document like this way: ------------------------------------------------------- PrintWriter writer; Document domDocument; Element domElement; // Root tag
0
1090
by: vdex42 | last post by:
Apologies if this has been asked before, but I haven't been able to find the answer to this yet: My problem is that .NET will not allow me to insert escaped '>' characters (i.e. &gt;) within the text property of asp buttons, it seems to strip out only those type of characters, because other escape codes DO work (eg. &quote;) For example <asp:button Runat=server text="test &gt;" ID=txtTest></asp:button>
11
2231
by: Holger | last post by:
Hi I have not been able to figure out how to do compound statement from C - "<test>?<true-val>:<false-val>" But something similar must exist...?! I would like to do the equivalent if python of the C line: printf("I saw %d car%s\n", n, n != 1 ? "s" : "")
21
2010
by: py_genetic | last post by:
Hello, I'm importing large text files of data using csv. I would like to add some more auto sensing abilities. I'm considing sampling the data file and doing some fuzzy logic scoring on the attributes (colls in a data base/ csv file, eg. height weight income etc.) to determine the most efficient 'type' to convert the attribute coll into for further processing and efficient storage... Example row from sampled file data: , ....]
2
1276
by: defn noob | last post by:
What does >and << do? Googling on them and they are just ignored...
0
8687
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9034
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8883
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7750
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
6534
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4629
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2347
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2009
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.