| Home | Trees | Indices | Help |
|
|---|
|
|
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
|
|||
stddigits =
|
|||
special_str =
|
|||
|
|||
|
|
Represent the integer n as a string of digits in the given base. Recursive division is used to make this function about 3x faster than Python's str() for converting integers to decimal strings. The 'size' parameters specifies the number of digits in n; this number is only used to determine splitting points and need not be exact. |
Helper function for representing the floating-point number s as a decimal with dps places. Returns (sign, string, exponent) containing '' or '-', the decimal digits as a string, and an integer for the decimal exponent. If inexact, the decimal representation is rounded toward zero. |
Convert a raw mpf to a decimal floating-point literal with at most `dps` decimal digits in the mantissa (not counting extra zeros that may be inserted for visual purposes). The literal is formatted so that it can be parsed back to a number by to_str, float() or Decimal(). |
Create a raw mpf from a decimal literal, rounding in the specified direction if the input number cannot be represented exactly as a binary floating-point number with the given number of bits. The literal syntax accepted is the same as for Python floats. TODO: the rounding does not work properly for large exponents. |
|
|||
special_str
|
| Home | Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0beta1 on Fri Feb 29 13:56:45 2008 | http://epydoc.sourceforge.net |