GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • numbers — Numeric abstract base classes
  • Report a bug
  • Improve this page
  • Show source
  • index
  • modules
  • previous
  • Python
  • 3.16.0a2 documentation
  • The Python standard library
  • Numeric and Mathematical Modules

This view

  • Original page
  • New address

GeezerVison is showing docs.python.org — Numeric and Mathematical Modules

Numeric and Mathematical Modules¶

The modules described in this chapter provide numeric and math-related functions and data types. The numbers module defines an abstract hierarchy of numeric types. The math and cmath modules contain various mathematical functions for floating-point and complex numbers. The decimal module supports exact representations of decimal numbers, using arbitrary precision arithmetic.

The following modules are documented in this chapter:

  • numbers — Numeric abstract base classes
    • The numeric tower
    • Notes for type implementers
      • Adding more numeric ABCs
      • Implementing the arithmetic operations
  • math — Mathematical functions
    • Floating point arithmetic
    • Floating point manipulation functions
    • Power, exponential and logarithmic functions
    • Summation and product functions
    • Angular conversion
    • Trigonometric functions
    • Hyperbolic functions
    • Special functions
    • Number-theoretic functions
    • Constants
  • math.integer — integer-specific mathematics functions
  • cmath — Mathematical functions for complex numbers
    • Conversions to and from polar coordinates
    • Power and logarithmic functions
    • Trigonometric functions
    • Hyperbolic functions
    • Classification functions
    • Constants
  • decimal — Decimal fixed-point and floating-point arithmetic
    • Quick-start tutorial
    • Decimal objects
      • Logical operands
    • Context objects
    • Constants
    • Rounding modes
    • Signals
    • Floating-point notes
      • Mitigating round-off error with increased precision
      • Special values
    • Working with threads
    • Recipes
    • Decimal FAQ
  • fractions — Rational numbers
  • random — Generate pseudo-random numbers
    • Bookkeeping functions
    • Functions for bytes
    • Functions for integers
    • Functions for sequences
    • Discrete distributions
    • Real-valued distributions
    • Alternative Generator
    • Notes on Reproducibility
    • Examples
    • Recipes
    • Command-line usage
    • Command-line example
  • statistics — Mathematical statistics functions
    • Averages and measures of central location
    • Measures of spread
    • Statistics for relations between two inputs
    • Function details
    • Exceptions
    • NormalDist objects
    • Examples and Recipes
      • Classic probability problems
      • Monte Carlo inputs for simulations
      • Approximating binomial distributions
      • Naive bayesian classifier
© Copyright 2001 Python Software Foundation.
This page is licensed under the Python Software Foundation License Version 2.
Examples, recipes, and other code in the documentation are additionally licensed under the Zero Clause BSD License.
See History and License for more information.

The Python Software Foundation is a non-profit corporation. Please donate.

Last updated on Nov 12, 2026 (18:27 UTC). Found a bug?
Created using Sphinx 9.1.1.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.