mò
M©Fc           @   sŸ   d  Z  d k l Z e d d d d d d ƒZ e d e d j p t ‚ [ d d	 d
 Z d d d d e j o d d d d j n p t ‚ d S(   s  Assorted 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 $
(   s   Quantityi   f5.0f0.5i   t   docs   The 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.
i   i   i   i   i   i
   i	   N(   t   __doc__t   study.value.quantityt   Quantityt   goldenratiot   AssertionErrort	   Ramanujan(   R   R   R   (    (    t*   /home/eddy/.sys/py/study/maths/__init__.pyt   ?&   s   