Menu

Fraction

Nicolas Hainaux
Attachments
dbg_fraction.png (1817 bytes)
memo_fraction.png (3080 bytes)
There is a newer version of this page. You can find it here.


This class is used to manipulate fractions, e.g. quotients of integers. It provides methods specifically related to Fractions like simplification.

Possible args for __init__() :
Fraction
(num, den)
(sign, num, den)
(sign, num, den, exponent)
(RANDOMLY, sign, num_sign, num_max, deno_sign, deno_max)
a zero-degree-Monomial having a Fraction as coefficient

Fields :
simplification_in_progress: this boolean indicates if the Fraction is currently being simplified
same_deno_reduction_in_progress: this boolean indicates if the Fraction is currently being reduced to the same denominator as another one

These two properties help to know in which direction the next calculs should be done (simplify further or at the contrary compute the products).

There is also a 'status' field which aimed to replace these two fields (this work is still to do).

Debugging info :

Check Fraction's complete doc


Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.