473,396 Members | 1,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Gosper arithmetic in Python

Hello,

I hacked together a module implementing exact real
arithmetic via lazily evaluated continued fractions.
You can download it from
http://www-zo.iinf.polsl.gliwice.pl/...software/cf.py
an use as an almost drop-in replacement for the math module
if you don't care too much about performance.
I'd be happy to hear any feedback and suggestions.

Cheers,
Marcin
Feb 12 '07 #1
0 780

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

Similar topics

3
by: Robin Becker | last post by:
I'm sure we've had this discussion before, but I'm getting a bunch of problems related to various algorithms related to 32 bit arithmetic. The particular error/warnings I'm seeing are ...
0
by: Andrew Dalke | last post by:
I was messing around with a project, trying out various compression schemes. One of them was for arithmetic coding. My implementation is .. novel ... because it uses the Rational library for...
2
by: Dan Stromberg | last post by:
Is there already a pure python module that can do modular-arithmetic unit conversions, like converting a huge number of seconds into months, weeks... or a bandwidth measure into megabits/s or...
72
by: Gregory Petrosyan | last post by:
Please visit http://www.python.org/peps/pep-0204.html first. As you can see, PEP 204 was rejected, mostly because of not-so-obvious syntax. But IMO the idea behind this pep is very nice. So,...
3
by: randomtalk | last post by:
hello everyone! Well, recently i've been trying to pick up c and see what is pointer all about (been programming in lisp/python for the better part of my last two years).. mmm.. I'm currently...
8
by: Robin Becker | last post by:
Hi, just trying to avoid wheel reinvention. I have need of an unsigned 32 bit arithmetic type to carry out a checksum operation and wondered if anyone had already defined such a beast. Our...
1
by: mmm | last post by:
I wrote the code below to create simple arithmetic sequences that are iter-able I.e., this would basically combine the NUMPY arange(start,end,step) to range(start,end), with step not necessarily...
5
by: Michael Press | last post by:
I already compiled and installed the GNU multiprecision library on Mac OS X, and link to it in C programs. How do I link to the library from Python? I do not want to download and install redundant...
6
by: fred8865 | last post by:
Hi all, I understand that due to different arithmetic used in floating points they are just approximations. Hence, 180/100=1 in my python interpreter. How can I tackle this problem of inaccurate...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...

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.