mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Fix typo
This commit is contained in:
parent
ff1f97307d
commit
23bdcc9253
1 changed files with 2 additions and 2 deletions
|
@ -1597,13 +1597,13 @@ suggest, so we trap :const:`Inexact` to signal a need for more precision::
|
||||||
>>> float_to_decimal(math.pi)
|
>>> float_to_decimal(math.pi)
|
||||||
Decimal("3.141592653589793115997963468544185161590576171875")
|
Decimal("3.141592653589793115997963468544185161590576171875")
|
||||||
|
|
||||||
Q. Why isn't the :func:`floatToDecimal` routine included in the module?
|
Q. Why isn't the :func:`float_to_decimal` routine included in the module?
|
||||||
|
|
||||||
A. There is some question about whether it is advisable to mix binary and
|
A. There is some question about whether it is advisable to mix binary and
|
||||||
decimal floating point. Also, its use requires some care to avoid the
|
decimal floating point. Also, its use requires some care to avoid the
|
||||||
representation issues associated with binary floating point::
|
representation issues associated with binary floating point::
|
||||||
|
|
||||||
>>> floatToDecimal(1.1)
|
>>> float_to_decimal(1.1)
|
||||||
Decimal("1.100000000000000088817841970012523233890533447265625")
|
Decimal("1.100000000000000088817841970012523233890533447265625")
|
||||||
|
|
||||||
Q. Within a complex calculation, how can I make sure that I haven't gotten a
|
Q. Within a complex calculation, how can I make sure that I haven't gotten a
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue