Mu - Mathematical Utilities for Python

SourceForge project summary

Last updated 2006-05-28

Mu is intended to become a general mathematics library written in Python. The main objective is recreational and interactive use, as well as generality and code reusability (hence being written entirely in Python). This project is still at an early stage, but some tentative development code is available:

A document describing planned classes, functions, and data objects is available.

Executing from mu import * currently (version 0.005) imports the following objects and functions, among a few others:

General:
  Interval
  Infinity

Mathematical constants:
  pi
  e
  gammac
  catalan
  sqrt2
  log2

Special functions:
  exp
  log

Number sequences:
  seq.factorial
  seq.Fibonacci
  seq.Lucas
  seq.LucasU[P,Q]
  seq.LucasV[P,Q]
  seq.natural

The constants are symbolic objects that can be evaluated to arbitrary precision (e.g. by converting them to Decimals, or interacting arithmetically with Decimals). The special functions work on both regular floats and Decimals (with arbitrary precision). The number sequences are infinite, supporting lazy generation ("for k in seq.Fibonacci: ..."), slicing ("seq.Fibonacci[::3]" to create the sequence of every third Fibonacci number), etc.

Much more to be added!

If you have any questions or would like to contribute, send a mail to Fredrik at fredrik.johansson(at)gmail.com


Hosted by SourceForge.net