Since the interest is more in extended precision than in decimal
representation, there is another module that may be of interest.
http://calcrpnpy.sourceforge.net/clnum.html
It interfaces to the Class Library for Numbers (CLN) library to provide
both arbitrary precision floating point and comp
Neil Cerutti wrote:
>> Another guess could be that real numbers being closed under the
>> four arithmetic operations, there is no danger to accidentally
>> step into complex numbers. OTOH floats and rationals are two
>> (conflicting) ways of extending integers.
>
> You would have to adopt a few s
The rpncalc package adds an interactive Reverse Polish Notation (RPN)
interpreter to Python. This interpreter allows the use of Python as
an RPN calculator. You can easily switch between the RPN interpreter
and the standard Python interpreter.
Home page: http://calcrpnpy.sourceforge.net/
Chang
The ratfun module provides classes for defining polynomial and rational
function (ratio of two polynomials) objects. These objects can be used
in arithmetic expressions and evaluated at a particular point.
Home page: http://calcrpnpy.sourceforge.net/ratfun.html
Note: If you are using rpncalc-1.2
The clnum package adds rational numbers and arbitrary precision floating
point numbers in real and complex form to Python. Also provides
arbitrary precision floating point replacements for the functions in the
math and cmath standard library modules.
Home page: http://calcrpnpy.sourceforge.net/cln
Bas wrote:
> Are there any differences between this module and the one already
> present in numpy?
>
> http://www.scipy.org/doc/numpy_api_docs/numpy.lib.polynomial.html
>
> Cheers,
> Bas
>
Yes, there are quite a few. This module uses a multi-precision library
(clnum) to make the calculations m
The rpncalc package adds an interactive Reverse Polish Notation (RPN)
interpreter to Python. This interpreter allows the use of Python as
an RPN calculator. You can easily switch between the RPN interpreter
and the standard Python interpreter.
Home page: http://calcrpnpy.sourceforge.net/
Chang
The ratfun module provides classes for defining polynomial and rational
function (ratio of two polynomials) objects. These objects can be used
in arithmetic expressions and evaluated at a particular point.
Home page: http://calcrpnpy.sourceforge.net/ratfun.html
Note: If you are using rpncalc-1.2
The clnum package adds rational numbers and arbitrary precision floating
point numbers in real and complex form to Python. Also provides
arbitrary precision floating point replacements for the functions in the
math and cmath standard library modules.
Home page: http://calcrpnpy.sourceforge.net/cln
K.S.Sreeram wrote:
> Raymond L. Buvel wrote:
>> I just tried this and it is taking an extremely long time even on a fast
>> machine with 4 Gb of RAM. Killed it after a couple of minutes.
>
> Thats odd.
> 34564323**456356 completed on my laptop in 28 seconds.
> [Pyt
Felipe Almeida Lessa wrote:
> Em Dom, 2006-06-11 às 11:19 -0700, fl1p-fl0p escreveu:
>> import math
>> math.pow(34564323, 456356)
>>
>> will give math range error.
>>
>> how can i force python to process huge integers without math range
>> error? Any modules i can use possibly?
>
> 34564323**45635
The clnum package adds rational numbers and arbitrary precision floating
point numbers in real and complex form to Python. Also provides
arbitrary precision floating point replacements for the functions in the
math and cmath standard library modules.
Home page: http://calcrpnpy.sourceforge.net/cln
Tim Peters wrote:
> [Raymond L. Buvel, on
>http://calcrpnpy.sourceforge.net/clnumManual.html
> ]
>
>> The clnum module handles this calculation very quickly:
>>
>> >>> from clnum import mpf
>> >>> mpf("1e1") ** mpf("3.
Tim Peters wrote:
> The GNU GMP library (for which Python bindings are available) also
> supports "big floats", but their power operation is also restricted to
> integer powers and/or exact roots. This can be painful even to try;
> e.g.,
>
>>>> from gmpy import mpf
>>>> mpf("1e1") *
elventear wrote:
> Hi,
>
> I am the in the need to do some numerical calculations that involve
> real numbers that are larger than what the native float can handle.
>
> I've tried to use Decimal, but I've found one main obstacle that I
> don't know how to sort. I need to do exponentiation with re
Gary Wessle wrote:
> Robert Kern <[EMAIL PROTECTED]> writes:
>
>
>>Raymond L. Buvel wrote:
>>
>>
>>>Since you are a new Linux user, you should definitely follow Robert's
>>>advice about building as an ordinary user separately from the
Robert Kern wrote:
> Gary Wessle wrote:
>
>>"Raymond L. Buvel" <[EMAIL PROTECTED]> writes:
>
>
>>>When installing from source on a Debian system, you want the installed
>>>package to wind up in /usr/local/lib/python2.x/site-packages (where x
Gary Wessle wrote:
> Hi
>
> I am trying to install NumPy in my debian/testing linux
> 2.6.15-1-686.
>
When installing from source on a Debian system, you want the installed
package to wind up in /usr/local/lib/python2.x/site-packages (where x
represents the version of Python you are running th
compboy wrote:
> How do you print elements of the list in one line?
>
> alist = [1, 2, 5, 10, 15]
>
> so it will be like this:
> 1, 2, 5, 10, 15
>
> because if I use this code
>
> for i in alist:
> print i
>
> the result would be like this
>
> 1
> 2
> 5
> 10
> 15
>
> Thanks.
>
There ar
Gary Wessle wrote:
> Erik Max Francis <[EMAIL PROTECTED]> writes:
>
>
>>chun ping wang wrote:
>>
>>
>>>Hey i have a stupid question.
>>>How do i get python to print the result in only three decimal
>>>place...
>>>Example>>> round (2.9954254, 3)
>>>2.9951
>>>but i want to get r
Due to the contribution of Frank Palazzolo, a Windows binary installer
and build instructions are available for the clnum package. This also
makes ratfun and rpncalc usable on the Windows platform.
The clnum package adds rational numbers and arbitrary precision floating
point numbers in real and c
The clnum package adds rational numbers and arbitrary precision floating
point numbers in real and complex form to Python. Also provides
arbitrary precision floating point replacements for the functions in the
math and cmath standard library modules.
Home page: http://calcrpnpy.sourceforge.net/cln
[EMAIL PROTECTED] wrote:
> Does anyone know where I can get python code to perform a CRC
> calculation on an IP packet?
>
Check out http://crcmod.sourceforge.net/
--
http://mail.python.org/mailman/listinfo/python-list
Crcmod is a Python package for creating functions computing the Cyclic
Redundancy Check (CRC). Any generating polynomial producing 8, 16, 32,
or 64 bit CRCs is allowed. Generated functions can be used in Python or
C/C++ source code can be generated.
Home page: http://crcmod.sourceforge.net/
Chang
[EMAIL PROTECTED] wrote:
> I am writing a C extension with python 2.3.5 and need constructs
> similar to python
>func(*args, **kwds)
> What's a neat way to do that?
> I found pyrex has a __Pyx_GetStarArgs -
> is there something I'm missing from the regular C/API maybe using one
> of the PyArg_P
Larry Bates wrote:
Looking over the code, it seems very inefficient and hard to understand.
You really should check out the following.
http://sourceforge.net/projects/crcmod/
It will allow you to generate efficient CRC functions for use in Python
and in C or C++. The only thing you need to in
Tim Peters wrote:
> [Raymond L. Buvel]
>
>>Check out the unit test in the following.
>>
>>http://sourceforge.net/projects/crcmod/
>
>
> Cool!
>
>
>>I went to a lot of trouble to get the results to match the results of
>>binascii.crc32. As y
Peter Hansen wrote:
> Larry Bates wrote:
>
>> I'm trying to get the results of binascii.crc32
>> to match the results of another utility that produces
>> 32 bit unsigned CRCs.
>
>
> What other utility? As Tim says, there are many CRC32s... the
> background notes on this one happen to stumble
The rpncalc package adds an interactive Reverse Polish Notation (RPN)
interpreter to Python. This interpreter allows the use of Python as
an RPN calculator. You can easily switch between the RPN interpreter
and the standard Python interpreter.
Home page: http://calcrpnpy.sourceforge.net/
Chang
Alex Martelli wrote:
> As things stand now (gmpy 1.01), an instance d of decimal.Decimal cannot
> transparently become an instance of any of gmpy.{mpz, mpq, mpf}, nor
> vice versa (the conversions are all possible, but a bit laborious, e.g.
> by explicitly going through string-forms).
>
> I'm thin
Shi Mu wrote:
> any python module to calculate sin, cos, arctan?
The other answers in this thread point you to the standard modules. If
you need arbitrary precision floating point versions of these functions
check out:
http://calcrpnpy.sourceforge.net/clnumManual.html
--
http://mail.python.org/
Tuvas wrote:
> Anyone know a module that does CRC16 for Python? I have an aplication
> that I need to run it, and am not having alot of sucess. I have a
> program in C that uses a CRC16 according to CCITT standards, but need
> to get a program that tests it with python as well. Thanks!
>
Try this
Grant Edwards wrote:
> I give up, how do I make this not fail under 2.4?
>
> fcntl.ioctl(self.dev.fileno(),0xc0047a80,struct.pack("HBB",0x1c,0x00,0x00))
>
> I get an OverflowError: long int too large to convert to int
>
> ioctl() is expecting a 32-bit integer value, and 0xc0047a80 has
> the hi
If you are using the root finder in Numeric, and are having problems,
check out the root finder in the ratfun module. My testing indicates
that it will give the exact roots of a Wilkinson polynomial of degree
100. For more information see
http://calcrpnpy.sourceforge.net/ratfun.html
--
http://m
Chris Spencer wrote:
> Is there any library for Python that implements a kind of universal
> number object. Something that, if you divide two integers, generates a
> ratio instead of a float, or if you take the square root of a negative,
> generates a complex number instead of raising an exception?
I have just released a new module that interfaces the Class Library for
Numbers (CLN) to Python. The CLN library is a C++ library that provides
rational and arbitrary precision floating point numbers in real and
complex form. The clnum module exposes these types to Python and also
provides arbitr
I am preparing to release an extension module that interfaces Python to
the Class Library for Numbers (http://www.ginac.de/CLN/). This module
will provide Python types for arbitrary precision floating point
numbers, rational numbers, and their complex counterparts. The module
also includes most o
I posted the following a while back. I think this is what you are
looking for.
This can be done fairly easily by creating a module (lets call it
interactive) with the following code in it.
---
import sys,os
def debug_exception(type, value, traceback):
# Restore redirected standard I
Alex Renelt wrote:
Alex Renelt wrote:
in addition:
I'm writing a class for polynomial manipulation. The generalization of
the above code is:
definitions:
1.) p = array([a_0, a_i, ..., a_n]) represents your polynomial
P(x) = \sum _{i=0} ^n a_i x^i
2.) deg(p) is its degree
3.) monic(p) makes P moni
Just wrote:
SciPy indeed appear to contain a solver, but I'm currently stuck in
trying to _get_ it for my platform (OSX). I'm definitely not going to
install a Fortran compiler just to evaluate it (even though my name is
not "Ilias" ;-). Also, SciPy is _huge_, so maybe a Python translation of
David Joyner wrote:
Hi:
I'm trying to compile python 2.4 with tkinter.
(I'm trying to write a gui interface which
calls a program called GAP - I'm hoping to use
subprocess, a python 2.4 module, since I was getting
deadlocks using popen).
The instructions at the python web site said basically
to edi
Robert Brewer wrote:
Gavin Bauer wrote:
My DOS window (running in windows ME) closes the second it finishes
running my programs. As you can imagine, this makes it hard to see the
results. I've gotten in the habit of putting raw_input("Press enter to
exit") at the end of every program, and in additi
The ratfun module provides classes for defining polynomial and rational
function (ratio of two polynomials) objects. These objects can be used
in arithmetic expressions and evaluated at a particular point.
Home page: http://calcrpnpy.sourceforge.net/ratfun.html
Note: If you are using rpncalc-1.
The rpncalc package adds an interactive Reverse Polish Notation (RPN)
interpreter to Python. This interpreter allows the use of Python as
an RPN calculator. You can easily switch between the RPN interpreter
and the standard Python interpreter.
Home page: http://calcrpnpy.sourceforge.net/
Changes
Bo Peng wrote:
Dear list,
I am writing a Python extension module that needs a way to expose pieces
of a big C array to python. Currently, I am using NumPy like the following:
PyObject* res = PyArray_FromDimsAndData(1, int*dim, PyArray_DOUBLE,
char*buf);
Users will get a Numeric Array object an
The rpncalc package adds an interactive Reverse Polish Notation (RPN)
interpreter to Python. This interpreter allows the use of Python as
an RPN calculator. You can easily switch between the RPN interpreter
and the standard Python interpreter.
Home page: http://calcrpnpy.sourceforge.net/
Changes
Alex Martelli wrote:
Raymond L. Buvel <[EMAIL PROTECTED]> wrote:
Mike Meyer wrote:
PEP: XXX
Title: A rational number module for Python
I think it is a good idea to have rationals as part of the standard
distribution but why not base this on the gmpy module
(https://sourceforge.net/pr
Mike Meyer wrote:
PEP: XXX
Title: A rational number module for Python
I think it is a good idea to have rationals as part of the standard
distribution but why not base this on the gmpy module
(https://sourceforge.net/projects/gmpy)? That module already provides
good performance. However, it d
48 matches
Mail list logo