Quotient of two numeric Sums and/or Products. More...
Public Member Functions | |
| def | __init__ |
| Constructor. | |
| def | __cmp__ |
| Compares two Fractions. | |
| def | is_reducible |
| True if the fraction is reducible So if numerator and denominator *are numeric Products* with both exponent 1 both and their GCD is strictly greater than 1. | |
| def | is_equivalent_to_an_irreducible_Fraction |
| True if the object is or only contains one irreducible Fraction. | |
| def | get_simplification_in_progress |
| Returns True if Fraction's status is simplification_in_progress. | |
| def | set_down_numerator_s_minus_sign |
| Sets the sign of the fraction and of numerator in the case. | |
| def | simplification_line |
| Simplification line of a fraction i.e. | |
| def | replace_striked_out |
| Replace the striked out Items by Item(1). | |
| def | simplified |
| Returns the fraction after a simplification step. | |
| def | __str__ |
| Raw display of the Fraction (debugging method). | |
| def | calculate_next_step |
| Returns None|The Fraction in the next step of simplification. | |
| def | expand_and_reduce_next_step |
| Same as calculate_next_step in the case of Fractions. | |
Quotient of two numeric Sums and/or Products.
Definition at line 7341 of file __init__.py.
| def obj::calc::Fraction::__cmp__ | ( | self, | ||
| obj | ||||
| ) |
Compares two Fractions.
Definition at line 7546 of file __init__.py.
| def obj::calc::Fraction::__init__ | ( | self, | ||
| arg, | ||||
| options | ||||
| ) |
Constructor.
| arg | Fraction|(num,den)|(sign,num,den)|(sign,num,den,exponent)| (__.RANDOMLY, sign, num_sign, num_max, deno_sign, deno_max)| zero-degree-Monomial having a Fraction as coefficient | |
| **options | copy_other_fields_from=<Fraction> -> can be used with (num, den) to get all the other fields from the given Fraction (including sign) |
Reimplemented from obj::calc::Quotient.
Definition at line 7361 of file __init__.py.
| def obj::calc::Fraction::__str__ | ( | self, | ||
| options | ||||
| ) |
Raw display of the Fraction (debugging method).
| options | No option available so far |
Reimplemented from obj::calc::Quotient.
Definition at line 8101 of file __init__.py.
| def obj::calc::Fraction::calculate_next_step | ( | self, | ||
| options | ||||
| ) |
Returns None|The Fraction in the next step of simplification.
Fix the 4th case. Should be less cases... check source
Fix the /!\ or check if the 3d CASE is not obsolete (duplicated in the simplified method)
Reimplemented from obj::calc::Quotient.
Definition at line 8122 of file __init__.py.
| def obj::calc::Fraction::get_simplification_in_progress | ( | self | ) |
Returns True if Fraction's status is simplification_in_progress.
Definition at line 7631 of file __init__.py.
| def obj::calc::Fraction::is_reducible | ( | self | ) |
True if the fraction is reducible So if numerator and denominator *are numeric Products* with both exponent 1 both and their GCD is strictly greater than 1.
If any of denominator or numerator is an Item, then it is embedded by this method in a Product to allow the further simplification of the Fraction
Definition at line 7573 of file __init__.py.
| def obj::calc::Fraction::set_down_numerator_s_minus_sign | ( | self | ) |
Sets the sign of the fraction and of numerator in the case.
of this example : +{-2}/{5} (nothing to compute just the minus sign to put "down"
Definition at line 7658 of file __init__.py.
| def obj::calc::Fraction::simplification_line | ( | self | ) |
Simplification line of a fraction i.e.
Factorization of numerator and denominator in the right smaller numbers Products.
Add an option to __init__ to allow "inserting Products": see code
maybe the case of Item having a negative *value* has not been managed. I mean, Items like ±(-2)
Definition at line 7683 of file __init__.py.
1.6.3