Here, I'd like to briefly summarize what Python has done.
Python supports decimal arithmetic. The functionality is part of the standard library. Decimals aren't available out-of-the-box, in the sense that all Python programs, regardless of what they import, can start working with decimals. There is no decimal literal syntax in the language. That said, all one needs to do is
import * from decimal and you're ready to rock.
Decimals have been part of the Python standard library for a long time: they were added in version 2.4, in November 2001. Python does have a process for proposing extensions to the language, called PEP (Python Extension Proposal). Extensive discussions on the official mailing lists took place. Python decimals were formalized in PEP 327.
The decimal library provides access to some of the internals of decimal arithmetic, called the context. In the context, one can specify, for instance, the number of decimal digits that should be available when operations are carried out. One can also forbid mixing of decimal values with primitive built-in types, such as integers and (binary) floating-point numbers.
In general, the Python implementation aims to be an implementation of the General Decimal Arithmetic Specification. In particular, using this data model, it is possible to distinguish the digit strings
1.20, considered as decimal values, as mathematically equal but nonetheless distinct values.
Here are the supported mathematical functions:
As mentioned above, the data model for Python decimals allows for subnormal decimals, but one can always normalize a value (remove the trailing zeros). (This isn't exactly a mathematical function, since distinct members of a cohort are mathematically equal.)
In Python, when importing decimals, some of the basic arithmetic operators get overloaded. Thus,
Trigonometric functions are not provided. (These functions belong to the
optional part of the IEEE 754 specification.)