Xorn
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
Functions
xorn.fixednum Namespace Reference

Fixed-point numbers. More...

Functions

def format
 Convert an integer to its fixed-point string representation. More...
 
def parse
 Convert a fixed-point string representation to an integer. More...
 

Detailed Description

Fixed-point numbers.

This module provides formatting and parsing functions for fixed-point number notation.

Function Documentation

def xorn.fixednum.format (   x,
  decimal_digits 
)

Convert an integer to its fixed-point string representation.

Parameters
[in]xvalue to convert (must be either int or long)
[in]decimal_digitsnumber of decimal digits used in the notation

TODO: For efficiency reasons, this should be ported to C.

Definition at line 32 of file fixednum.py.

def xorn.fixednum.parse (   s,
  decimal_digits 
)

Convert a fixed-point string representation to an integer.

Parameters
[in]xvalue to convert (must be either str or unicode)
[in]decimal_digitsnumber of decimal digits used in the notation

TODO: For efficiency reasons, this should be ported to C.

Definition at line 74 of file fixednum.py.