mò
M©Fc@sŸdZdklZeddddddƒZededjpt‚[dd d
Zddddejod
dddjnpt‚dS(sAssorted mathematical tools and toys.
Polynomials:
Legendre -- spherical hamonics and Legendre polynomials
multiangle -- expressing sin and cos, of multiples of an angle, as polynomials
in those of the angle
multinomial -- polynomials in several free variables
polynomial -- polynomials in one free variable
Combinatorics:
Fibonacci -- computing the eponymous sequence
Pascal -- factorials and the eponymous triangle (see also permute)
stirling -- deploying Stirling's formula
Permutations:
permute -- interpreting lists of integers as permutations
queens -- solving the 'eight queens' problem by iterating over permutations
Distributions and probabilities:
gamma -- the Gamma distribution (see also stirling)
gauss -- the Gaussian (bell-shaped) distribution
variate -- generating chaotic samples from assorted distributions
Solving equations:
cardan -- finds roots of polynomials of degree at most three
root -- searching for zeros of a ({reals}::{reals}) function
search -- similar, but in two dimensions (represented by complex)
Miscellaneous:
graph -- the find/unite algorithm and description of a graph
integrate -- perform adequate approximations to integrating a function
natural -- the natural numbers, and tools to work with types kindred to them
primes -- factorisation and a disk-cached lazy list of all primes
pythagorean -- integer-sided right-angle triangles
ratio -- representing exact fractions and approximating numbers with them
$Id: __init__.py,v 1.2 2007/03/24 22:42:21 eddy Exp $
(sQuantityif5.0f0.5itdocsThe golden ratio.
This is the positive solution to the quadratic equation x*x = x+1; divide -1 by
it to get the negative solution. One can re-write the equation as (2*x-1)**2 =
4*x*x -4*x +1 = 4*(x*x-x) + 1 = 5, whence the solutions are (1 +/- 5**.5)/2.
ii
iiii
i N(t__doc__tstudy.value.quantitytQuantitytgoldenratiotAssertionErrort Ramanujan(RRR((t*/home/eddy/.sys/py/study/maths/__init__.pyt?&s