elasticai.creator.nn.fixed_point.number_conversion
#
Here we collect several functions to convert fixed point, integer and natural numbers to bit patterns and vice versa.
IMPORTANT: We assume, the numbers to be representable in the target format!
Module Contents#
Functions#
API#
- elasticai.creator.nn.fixed_point.number_conversion.bits_to_rational(pattern: str, frac_bits: int) float [source]#
- elasticai.creator.nn.fixed_point.number_conversion.convert_rational_to_bit_pattern(rational: float, total_bits: int, frac_bits: int) str [source]#
- elasticai.creator.nn.fixed_point.number_conversion.integer_to_bits(number: int, total_bits: int) str [source]#
- elasticai.creator.nn.fixed_point.number_conversion.max_rational(total_bits: int, frac_bits: int) float [source]#