Re: extend methods of decimal module

2014-02-28 Thread casevh
, cdecimal uses a Number Theory Transform for multiplication of very large numbers. It has been a while since I looked so I could be wrong. casevh -- https://mail.python.org/mailman/listinfo/python-list

Re: extend methods of decimal module

2014-02-19 Thread casevh
the transcendental function available in the MPFR library. I did a quick performance test of sqrt() and ln() at around 1000 decimal digits. gmpy2 was about ~200 times faster than the corresponding functions in decimal. casevh -- https://mail.python.org/mailman/listinfo/python-list

Re: New to Py 3.3.3 having prob. with large integer div. float.

2014-02-10 Thread casevh
.mpz(x) Python 3.x performs true division by default. When integer division involves an mpz, the result will be an mpfr with the precision of the current context. Does this help? casevh -- https://mail.python.org/mailman/listinfo/python-list

[ANN] GMPY2 2.0.0 has been released

2013-03-26 Thread casevh
I'm pleased to announce the release of GMPY2 2.0.0. GMPY2 provides access to the GMP/MPIR, MPFR, and MPC arbitrary precision arithmetic libraries. Highlights -- * Support for correctly rounded arbitrary precision real arithmetic, including trigonometric, logarithmic, exponential, and

Re: Calculate Big Number

2013-01-08 Thread casevh
on performance. gmpy will be faster than Python as the numbers get larger. The cutover varies depending on the platform, but usually occurs between 50 and 100 digits. casevh --gv -- http://mail.python.org/mailman/listinfo/python-list

Re: bit count or bit set Python3

2012-10-26 Thread casevh
On Thursday, October 25, 2012 7:56:25 AM UTC-7, Charles Hixson wrote: In Python3 is there any good way to count the number of on bits in an integer (after an operation)? You may want to look at gmpy2[1] and the popcount() function. Alternatively, is there any VERY light-weight

GMPY2 2.0.0b1 available

2012-04-09 Thread casevh
: http://readthedocs.org/docs/gmpy2/en/latest/ Please test this release and report any issues! casevh -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

Re: why did GMPY change the names of its functions?

2012-03-26 Thread casevh
release, I will document the name changes. import gmpy2 as gmpy; gmpy.scan0=gmpy.bit_scan0; etc should work just fine. If you encounter problems with the alpha release, please open an issue on gmpy's site. Thanks, casevh On Sunday, March 25, 2012 9:59:56 PM UTC-7, Mensanator wrote: OK, GMPY

Re: PyCrypto builds neither with MSVC nor MinGW

2012-03-12 Thread casevh
a binary installer with python setup.py bdist-wininst. There may be a cleaner way to build PyCrypto, but these steps worked for me. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: PyCrypto builds neither with MSVC nor MinGW

2012-02-06 Thread casevh
and then adapt/modify the process for PyCrypto. MPIR home page: www.mpir.org gmpy source: gmpy.googlecode.com/files/gmpy-1.15.zip doesn't even MinGW install PyCrypto for me? Thanks for all suggestions, Alec Taylor Hope these comments help... casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Counting bits in large string / bit vector

2011-09-26 Thread casevh
or something similar. There is also another library  http://pypi.python.org/pypi/bitarray which resembles numpy's bit array. Hope it helps, S.Nizamov You can also use gmpy or gmpy2. a=gmpy2.mpz(123) bin(a) '0b011' gmpy2.hamdist(a,0) 6 casevh -- http://mail.python.org/mailman

Re: Representation of floats (- Mark Dickinson?)

2011-09-06 Thread casevh
) and (1.21)? casevh jmf -- http://mail.python.org/mailman/listinfo/python-list

Re: relative speed of incremention syntaxes (or i=i+1 VS i+=1)

2011-08-21 Thread casevh
that operations with mutable integers should be much faster. With agressive caching of deleted objects, the object creation overhead is very low. So the big win for mutable integers is reduced to avoiding memory copies.) casevh To be clear, this is nothing you should consider when writing fast code

Re: Puzzled about the output of my demo of a proof of The Euler Series

2011-08-10 Thread casevh
converge to pi^2/6 from below and since the sum(1/k^2) is between the two partial sums, it must also converge to pi^2/6. Try calculating sum(1/k^2) for k in range(1, 2**n) and compare that with the upper and lower sums. I verified it with several values up to n=20. casevh -- http://mail.python.org

Re: Large number multiplication

2011-07-07 Thread casevh
mailing list. casevh -- http://mail.python.org/mailman/listinfo/python-list

ANN: GMPY2 alpha2 is available for testing

2011-06-10 Thread casevh
consistent Please report any issues! casevh -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

ANN: GMPY2 or How I learned to love nan

2011-06-09 Thread casevh
an exception * more complete coverage for MPFR * many function names were changed to be more consistent Please report any issues! casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: integer multiplication

2011-04-04 Thread casevh
critical code with older versions of gmpy, I'd recommend upgrading to 1.14. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Porting Python2 C-API/Swig based modules to Python 3

2011-02-23 Thread casevh
/3.2/lib/python3.2/site-packag­es/_pcapmodule.so ^D- Hide quoted text - - Show quoted text - This is a change in the C-API in 3.2. See http://bugs.python.org/issue5630 casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: inverse of a matrix with Fraction entries

2010-11-27 Thread casevh
On Nov 27, 4:00 am, m...@distorted.org.uk (Mark Wooding) wrote: casevh cas...@gmail.com writes: I coded a quick matrix inversion function and measured running times using GMPY2 rational and floating point types. For the floating point tests, I used a precision of 1000 bits. With floating

Re: inverse of a matrix with Fraction entries

2010-11-27 Thread casevh
On Nov 27, 3:08 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Fri, 26 Nov 2010 19:21:47 -0800, casevh wrote: On Nov 26, 2:11 pm, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Fri, 26 Nov 2010 12:54:12 -0800, John Nagle wrote: For ordinary number

Re: inverse of a matrix with Fraction entries

2010-11-26 Thread casevh
at http://code.google.com/p/gmpy/ casevh Disclaimer: I'm the current maintainer of GMPY. -- http://mail.python.org/mailman/listinfo/python-list

Re: inverse of a matrix with Fraction entries

2010-11-26 Thread casevh
matrix using rationals would take a month or longer and require much more memory. But the rational solution would be exact. casevh -- http://mail.python.org/mailman/listinfo/python-list

ANN: GMPY 1.14 and GMPY2 alpha1 released

2010-11-18 Thread casevh
performance improvements. Please report any issues! casevh -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

ANN: GMPY 1.14 and GMPY2 alpha1 released

2010-11-18 Thread casevh
performance improvements. Please report any issues! casevh -- http://mail.python.org/mailman/listinfo/python-list

ANN: GMPY 1.13 released

2010-08-31 Thread casevh
of the mpq rational type to match previous versions of GMPY (prior to 1.10) and to match Python's Fraction type. Properties to access the numerator and denominator were added. Binary installers for Python 3.2 are available. Please report any issues! casevh -- http://mail.python.org/mailman

Re: Download Microsoft C/C++ compiler for use with Python 2.6/2.7 ASAP

2010-07-06 Thread casevh
of the VS 2008 amd64 compiler. I've used it compile MPIR and GMPY successfully. The GMPY source includes a text file describing the build process using the SDK tools. casevh Also, VS2010 should work as well - doesn't it? Remember Python on Windows will still require VS2008 for a long time

ANN: GMPY 1.12 stable and GMPY2 unstable released

2010-06-27 Thread casevh
Microsoft's SDK compilers using MPIR 2.1.1. Detailed instructions are included if you want to compile your own binary. Please report any issues! casevh -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org

ANN: GMPY 1.12 and GMPY2 unstable released

2010-06-26 Thread casevh
Microsoft's SDK compilers using MPIR 2.1.1. Detailed instructions are included if you want to compile your own binary. Please report any issues! casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Where does make altinstall put stuff?

2010-05-30 Thread casevh
to make sure that no part of the existing Python installation on Fedora Core is overwritten by an altinstall of 2.6.                                 John Nagle It's placed in the directory specified by --prefix. If --prefix is not specified, /usr/local is used by default. casevh -- http

Re: Calculating very large exponents in python

2010-03-09 Thread casevh
On Mar 8, 10:39 pm, casevh cas...@gmail.com wrote: [also replying to Geremy since the OP's message doesn't appear...] On Mar 8, 11:05 am, geremy condra debat...@gmail.com wrote: On Mon, Mar 8, 2010 at 2:15 AM, Fahad Ahmad miracles...@hotmail.com wrote: Thanks Geremy, That has been

Re: Calculating very large exponents in python

2010-03-08 Thread casevh
There still is a 98 digit unfactored composite: 60252507174568243758911151187828438446814447653986842279796823262165159406500174226172705680274911 Factoring this remaining composite using ECM may not be practical. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: GMPY 1.11 released

2010-02-03 Thread casevh
On Feb 2, 10:03 pm, Mensanator mensana...@aol.com wrote: On Feb 2, 12:45 am, casevh cas...@gmail.com wrote: Everyone, I'm pleased to annouce the final release of GMPY 1.11. GMPY is a wrapper for the MPIR or GMP multiple-precision arithmetic library. GMPY 1.11 is available for download

Re: ANN: GMPY 1.11 released

2010-02-03 Thread casevh
On Feb 3, 10:22 am, Mensanator mensana...@aol.com wrote: On Feb 3, 10:37 am, casevh cas...@gmail.com wrote: On Feb 2, 10:03 pm, Mensanator mensana...@aol.com wrote: On Feb 2, 12:45 am, casevh cas...@gmail.com wrote: Everyone, I'm pleased to annouce the final release of GMPY

ANN: GMPY 1.11 released

2010-02-02 Thread casevh
and use code optimized for the CPU at runtime. The 64-bit Windows installers were compiled Microsoft's SDK compilers using MPRI 1.3.1. Detailed instructions are included if you want to compile your own binary. Please report any issues! casevh -- http://mail.python.org/mailman/listinfo/python

Re: Python distutils build problems with MinGW

2010-02-01 Thread casevh
://bugs.python.org/issue6377. I applied the patch to my local copy of Python 3.1 and it seems to work. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: ISO module for binomial coefficients, etc.

2010-01-24 Thread casevh
binomial coefficients and factorials. If you are floating point approximations, check out mpmath (http://code.google.com/p/mpmath/). casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Rounding up to the next 100

2010-01-21 Thread casevh
is using math.ceil and math.floor. import math 100*math.ceil(1234.5678/100) 1300 100*math.floor(1234.5678/100) 1200 100*math.ceil(-1234.5678/100) -1200 100*math.floor(-1234.5678/100) -1300 casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-12 Thread casevh
On Jan 12, 9:03 pm, Dave WB3DWE wrote: On Sun, 10 Jan 2010 22:08:20 -0800 (PST), casevh cas...@gmail.com wrote: On Jan 10, 8:16 pm, Dave WB3DWE wrote: On Sat, 9 Jan 2010 16:48:52 -0800 (PST), casevh cas...@gmail.com wrote: On Jan 9, 3:10 pm, pdlem...@earthlink.net wrote: On Sat

Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-10 Thread casevh
On Jan 10, 8:16 pm, Dave WB3DWE wrote: On Sat, 9 Jan 2010 16:48:52 -0800 (PST), casevh cas...@gmail.com wrote: On Jan 9, 3:10 pm, pdlem...@earthlink.net wrote: On Sat, 9 Jan 2010 13:27:07 -0800 (PST), casevh cas...@gmail.com wrote: 1) Try the commands again. Make sure all the ./configure

Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-09 Thread casevh
On Jan 9, 10:06 am, Dave WB3DWE wrote: On Jan 6 I inquired how to fix the 3.1.1 interactive terminal in Ubuntu Linux.   Left arrow yields ^[[D , etc. casevh helped by suggesting libreadline5-dev be installed. Did so with Synaptic Package Manager. The behavior of the Python 3.3.1 terminal

Re: interactive terminal in Ubuntu Linux : libreadline5-dev works only in Python 2.6 not 3.1

2010-01-09 Thread casevh
On Jan 9, 3:10 pm, pdlem...@earthlink.net wrote: On Sat, 9 Jan 2010 13:27:07 -0800 (PST), casevh cas...@gmail.com wrote: Did you recompile Python 3.1.1 after installing libreadline5-dev? (From the Python 3.1.1 directory. Your options to configure may vary.) make distclean ./configure

Caching objects in a C extension

2010-01-08 Thread casevh
reference before stuffing the object into the cache (even though it will look like there is a memory leak when running under a debug build)? Thanks in advance for any comments, casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Caching objects in a C extension

2010-01-08 Thread casevh
On Jan 8, 2:59 am, Diez B. Roggisch de...@nospam.web.de wrote: casevh schrieb: I'm working with a C extension that needs to rapidly create and delete objects. I came up with an approach to cache objects that are being deleted and resurrect them instead of creating new objects

Re: Caching objects in a C extension

2010-01-08 Thread casevh
On Jan 8, 9:19 am, Diez B. Roggisch de...@nospam.web.de wrote: casevh schrieb: On Jan 8, 2:59 am, Diez B. Roggisch de...@nospam.web.de wrote: casevh schrieb: I'm working with a C extension that needs to rapidly create and delete objects. I came up with an approach to cache objects

Re: Caching objects in a C extension

2010-01-08 Thread casevh
On Jan 8, 8:56 am, Antoine Pitrou solip...@pitrou.net wrote: Le Fri, 08 Jan 2010 08:39:17 -0800, casevh a écrit : Thanks for the reply. I realized that I missed one detail. The objects are created by the extension but are deleted by Python. I don't know that an object is no longer needed

Re: Python interactive terminal in Ubuntu Linux : some keys fouled up

2010-01-06 Thread casevh
compiled the source code, you will also need to install libreadline5-dev via Synaptic or apt-get. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: the need for 64 bits

2009-12-28 Thread casevh
number of bits on a 64-bit platform is limited to 2**37 or 41 billion decimal digits. A number this size requires 16GB of RAM. A future version of GMP (5.x) is supposed to remove that limit and also work well with disk-based storage. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I install GMPY 1.11 on a Mac with OS X 10.6 and Python 3.1?

2009-12-26 Thread casevh
? (gmpy.gmp_limbsize()) For best performance with large numbers, GMPY should be compiled as a 64-bit application. If Python and gmp are not compiled in 64-bit mode, you probably will want to compile both of them from source or find 64- bit versions. casevh -- http://mail.python.org/mailman

Re: PyArg_ParseTupleAndKeywords in Python3.1

2009-12-18 Thread casevh
}; if (!PyArg_ParseTupleAndKeywords(args, kwrds, |CC, kwlist, a, b)) return NULL; return Py_BuildValue((CC), a, b); } The default values seem to remain as 'A' and 'B'. foo() ('A', 'B') foo(b='b') ('A', 'b') foo() ('A', 'B') foo('a') ('a', 'B') foo('a', b='b') ('a', 'b') foo() ('A', 'B') casevh

Re: PyArg_ParseTupleAndKeywords in Python3.1

2009-12-18 Thread casevh
On Dec 18, 10:28 am, Joachim Dahl dahl.joac...@gmail.com wrote: My mistake seems to be that I declared char a, b; instead of int a, b; Thank you for sorting this out. Joachim I think you need to initialize them, too. -- http://mail.python.org/mailman/listinfo/python-list

ANN: GMPY 1.11rc1 is available

2009-11-30 Thread casevh
. I plan to add a new mutable integer type in the next release of GMPY. If you want to experiment with mutable integers now, GMPY can be compiled with mutable version of the standard 'mpz' type. Please see the file mutable_mpz.txt for more information. Please report any issues! casevh -- http

Re: PyArg_ParseTupleAndKeywords in Python3.1

2009-11-30 Thread casevh
) to parse a single character from a byte-string and uses C (uppercase c) to parse a single character from a Unicode string. I don't think there is an easy way to accept a character from both. HTH, casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: PyArg_ParseTupleAndKeywords in Python3.1

2009-11-30 Thread casevh
. It appears to be a bug in Python. The format code 'C' is missing in the switch statement in skipitem() in getargs.c. I added case 'C': /* int */ after case 'c': /* char */ and then example worked for me. I'll open a bug report. casevh On Nov 30, 10:19 pm, casevh cas...@gmail.com wrote: On Nov 30, 1

ANN: GMPY 1.11rc1 is available

2009-11-29 Thread casevh
. I plan to add a new mutable integer type in the next release of GMPY. If you want to experiment with mutable integers now, GMPY can be compiled with mutable version of the standard 'mpz' type. Please see the file mutable_mpz.txt for more information. Please report any issues! casevh -- http

Re: C api and checking for integers

2009-11-12 Thread casevh
numeric protocols, and false otherwise. This function always succeeds. What do they mean: always succeeds ? That it will always return true or false; it won't raise an error. (2) It seems PyNumber_check(py_val) returns true when passed an instance! Please advise. -- Elias casevh -- http

Re: python3.1 shell and Arrow Keys ?

2009-10-08 Thread casevh
, casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread casevh
fractional exponent, inexact-root Warning: Completely untested fix ahead! What happens if you change turtle.py to use nhops=1+int((math.sqrt(diffsq)/(3*math.pow(1.1, self._speed) *self._speed)) casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Turtle Graphics are incompatible with gmpy

2009-08-05 Thread casevh
automatically so I think the revised calculation for nhops should work with either any numerical type that supports __float__. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: pack an integer into a string

2009-07-24 Thread casevh
On Jul 24, 3:28 pm, superpollo u...@example.net wrote: is there a pythonic and synthetic way (maybe some standard module) to pack an integer (maybe a *VERY* big one) into a string? like this:   number = 252509952   hex(number)   '0xf0cff00'   so i would like a string like

Re: integer square roots

2009-07-23 Thread casevh
. The time includes conversion from a string. If the numbers are already Python longs, it can check 800,000 per second. Checking a billion is not unreasonable. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: GMPY 1.10 alpha with support for Python 3

2009-07-19 Thread casevh
GMPY 1.10 beta is now available. This version fixes an issue where very large objects would be cached for reuse instead of being freed. Source code and Windows installers may be found at http://code.google.com/p/gmpy/downloads/list casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: GMPY 1.10 alpha with support for Python 3

2009-07-08 Thread casevh
On Jul 8, 5:03 pm, Mensanator mensana...@aol.com wrote: On Jul 7, 12:47 am, Mensanator mensana...@aol.com wrote: On Jul 7, 12:16 am, casevh cas...@gmail.com wrote: I discovered a serious bug with comparisons and have posted alpha2 which fixes that bug and adds Unicode support

ANN: GMPY 1.10 alpha with support for Python 3

2009-07-06 Thread casevh
! casevh -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations/

ANN: GMPY 1.10 alpha with support for Python 3

2009-07-06 Thread casevh
! casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: ANN: GMPY 1.10 alpha with support for Python 3

2009-07-06 Thread casevh
I discovered a serious bug with comparisons and have posted alpha2 which fixes that bug and adds Unicode support for Python 2.x casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: How to locate the bit in bits string?

2009-04-29 Thread casevh
On Apr 28, 5:39 pm, Li Wang li.wan...@gmail.com wrote: 2009/4/29 Tim Chase python.l...@tim.thechases.com: I want to concatenate two bits string together: say we have '1001' and '111' which are represented in integer. I want to concatenate them to '100' (also in integer form), my method

Re: Python and GMP.

2009-04-21 Thread casevh
On Apr 21, 12:11 am, Paul Rubin http://phr...@nospam.invalid wrote: casevh cas...@gmail.com writes: Python 3.1 is significantly faster than Python 2.x on 64-bit platforms. The following times are for multiplication with 2, 30 and 300 decimal digits. Could you test pow(a,b,c) where a,b,c

Re: Python and GMP.

2009-04-21 Thread casevh
On Apr 21, 5:47 am, Paul Rubin http://phr...@nospam.invalid wrote: casevh cas...@gmail.com writes: Could you test pow(a,b,c) where a,b,c are each 300 decimal digits? $ py25 -m timeit -s  a=long('23'*150);b=long('47'*150);m=long ('79'*150) c=pow(a,b,m) 10 loops, best of 3: 52.7 msec per

Re: Python and GMP.

2009-04-20 Thread casevh
is an LGPLv2 fork of GMP and is significantly faster than GMP 4.2.x. The newly released GMP 4.3.0 is about 10% faster yet. casevh -- http://mail.python.org/mailman/listinfo/python-list

ANN: gmpy 1.04 released

2009-02-02 Thread casevh
to the site-packages directory. casevh -- http://mail.python.org/mailman/listinfo/python-announce-list Support the Python Software Foundation: http://www.python.org/psf/donations.html

Re: Number of bits/sizeof int

2009-02-02 Thread casevh
to represent its argument in binary: Any tips on how to get this in 2.5.2 as that's the production version I'm stuck with. Cheers, Jon. If performance does become an issue, the newly released gmpy 1.04 includes bit_length(). casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: nth root

2009-02-01 Thread casevh
function. I think it will do exactly what you want. http://code.google.com/p/gmpy/ casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: nth root

2009-02-01 Thread casevh
On Feb 1, 1:04 pm, Mensanator mensana...@aol.com wrote: On Feb 1, 2:27 am, casevh cas...@gmail.com wrote: On Jan 31, 9:36 pm, Tim Roberts t.robe...@cqu.edu.au wrote: Actually, all I'm interested in is whether the 100 digit numbers have an exact integral root, or not.  At the moment

Re: nth root

2009-02-01 Thread casevh
On Feb 1, 10:02 pm, Mensanator mensana...@aol.com wrote: On Feb 1, 8:20 pm, casevh cas...@gmail.com wrote: On Feb 1, 1:04 pm, Mensanator mensana...@aol.com wrote: On Feb 1, 2:27 am, casevh cas...@gmail.com wrote: On Jan 31, 9:36 pm, Tim Roberts t.robe...@cqu.edu.au wrote

Re: gmpy and counting None

2008-10-13 Thread casevh
? I've added it for you. Thanks Martin Thanks for reporting the issue. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: numeric emulation and __pos__

2008-07-08 Thread casevh
the decimal module: from decimal import * t=Decimal('1.23456') t Decimal(1.23456) getcontext().prec = 5 +t Decimal(1.2346) Thanks for the feedback. -- Ethan casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: conflict between multiple installs of python (linux)

2008-07-05 Thread casevh
/ site.py, look for the line prefixes.insert(0, '/usr/local') and comment it out. That should do it. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Generating list of possible configurations

2008-07-03 Thread casevh
on Python 2.6. A new version and Windows binaries were released shortly after 2.6b1 was released. casevh -- http://mail.python.org/mailman/listinfo/python-list

ANN: gmpy v1.03 is released

2008-06-23 Thread casevh
Hi everyone, I'm happy to announce that GMPY v1.03 has been released. It is available at: http://code.google.com/p/gmpy/ What is GMPY? == GMPY is a C-coded Python extension module that wraps the GMP library to provide to Python code fast multiprecision arithmetic (integer,

Re: Multiprecision arithmetic library question.

2008-06-19 Thread casevh
No, I do not know that. Define desperate. Does Python support the extended Euclidean algorithm and other number theory functions? No. How fast does Python multiply? Python uses the Karatsuba algorithm which O(n^1.585). Division is still O(n^2). Not that the latter is particularly

Re: Hrounding error

2008-06-18 Thread casevh
not a Python problem. That is just the behavior for floating- point arithmetic. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Multiprecision arithmetic library question.

2008-06-17 Thread casevh
) -- Michael Press GMPY provides the interface between Python and GMP. It is available at http://code.google.com/p/gmpy/downloads/list casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Hrounding error

2008-06-17 Thread casevh
-point-calculations-so-inaccurate casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: 32 bit or 64 bit?

2008-06-15 Thread casevh
language. It includes support for MPFR, a multiple-precision floating point library based on GMP. www.sagemath.org casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Integer dicision

2008-04-10 Thread casevh
) casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: float / rounding question

2008-02-25 Thread casevh
as a binary number. If you really need decimal numbers, use the Decimal class. See http://docs.python.org/tut/node16.html. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: How about adding rational fraction to Python?

2008-02-24 Thread casevh
by the numerator and denominator was bounded. IIRC, a use case was matrix inversion. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: How about adding rational fraction to Python?

2008-02-24 Thread casevh
, Decimal, and Rational arithmetic. They all have there appropriate problem domains. And sometimes you just need unlimited precision, radix-6, fixed-point arithmetic casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Looking for an interpreter that does not request internet access

2007-06-29 Thread casevh
casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: How do I tell the difference between the end of a text file, and an empty line in a text file?

2007-05-16 Thread casevh
- for s in f: print s - casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.5, problems reading large ( 4Gbyes) files on win2k

2007-03-03 Thread casevh
() if __name__ == '__main__': write_file(loops=150) read_file() casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: finding out the precision of floats

2007-02-27 Thread casevh
. Decimal was intended to solve a different class of problems. It provides predictable arithmetic using decimal floating point. IEEE-754 provides predictable arithmetic using binary floating point. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Python / Socket speed

2007-02-26 Thread casevh
performance. I'm more curious about the original script. Either the test was against the loopback address, or he has a very impressive netork to sustain 1.8Gbit/s. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Rational numbers

2007-02-23 Thread casevh
releases of Python and GMP, so I consider it stable. Actually, gmpy is being maitained even if SourceForge isn't up to date. I got my gmpy 1.04a for Python 2.5 Windows binary from http://home.comcast.net/~casevh I haven't used the rationals all that much, but been very happy with them when I

Re: Rational numbers

2007-02-23 Thread casevh
and 1.03 as CVS updates only. I think he may have made an announcement that 1.02 included alpha support for Python 2.5. 1.04a is 1.03 with one additional fix. I don't think there has been an official release, though. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Rational numbers

2007-02-23 Thread casevh
be happy to point everyone to a real release. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: Rational numbers

2007-02-23 Thread casevh
Alex's most recent SVN version on Linux without any problems. I'll make Windows binaries next. casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: code optimization (calc PI) / Full Code of PI calc in Python and C.

2007-01-04 Thread casevh
elapsed:, round(clock() - start_time, 2), s print len(pi) casevh -- http://mail.python.org/mailman/listinfo/python-list

Re: code optimization (calc PI) / New Algorithme for PI

2007-01-04 Thread casevh
Yes, this gmpy sounds good for calc things like that. But not available on my machine. ImportError: No module named gmpy What type of machine? The home page for gmpy is http://sourceforge.net/projects/gmpy/ I have Windows versions available at http://home.comcast.net/~casevh/ casevh

  1   2   >