ABCs of numbers
The numbers package provides a tower of numeric types that are all implementations of numbers.Number. Additionally, the fractions and decimal modules provide extension numeric types: fractions.Fraction and decimal.Decimal. These definitions roughly parallel the mathematical thought on the various classes of numbers. An article available at http://en.wikipedia.org/wiki/Number_theory contains numerous links to in-depth explanations; for example, An Introduction to the Theory of Numbers.
The essential question is how well computers can implement the underlying mathematical abstractions. To be more specific, we want to be sure that anything that is computable in the abstract world of mathematics can be computed (or approximated) ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access