httk.core.storage.rational_text

Canonical text rendering for exact rational values.

Functions

fraction_to_text(value)

Return reduced p/q text with an explicit positive denominator.

Module Contents

httk.core.storage.rational_text.fraction_to_text(value)

Return reduced p/q text with an explicit positive denominator.

Parameters:

value (fractions.Fraction) – The canonical fraction to render.

Returns:

numerator/denominator text, including /1 for integers.

Return type:

str