| reductum_index | Function (ROM Call 0x2F0)

AMS 1.01 or higher | estack.h

ESI reductum_index (CESI ptr);

Gets the index of remaining terms of an expression.

If ptr points to the ADD_TAG, which is a case when it points to an expression of form term1 + term2 + ... (i.e. if the expression is a sum of simpler terms), reductum_index returns the pointer to the subexpression term2 + ... (which is a reductum subexpression of the given expression). If ptr does not point to the ADD_TAG (i.e. if the expression is not a sum of simpler terms), reductum_index returns a pointer to a simple zero expression, i.e. expression which consists only of number 0 (floating point or integer, depending of whether the approximation mode is active or not).
Note: Expressions in internal canonic form have the most main term shallowest (see lead_term_index. So, the reductum of `'2+x+y'` converted to canonic form is `'y+2'`. By default, similar powers of the main variable are collected in internal canonic forms. For example, the reductum of `'x^2*y+x^2+5'` converted to canonic form is `'5'`. See push_internal_simplify for more info about how to convert an expression into the internal canonic form.

Uses: next_expression_index, Float0Index, Integer0Index
Used by: did_push_anti_deriv, did_push_series, push_1st_derivative, push_csolve, push_czeros, push_def_int, push_desolve, push_expand, push_extended_prod, push_factor, push_floor, push_lim, push_max, push_min, push_nsolve, push_phase, push_sin2, push_solve, push_summation, push_zeros, did_push_to_polar, push_equals, push_exponentiate, push_greater_than, push_greater_than_or_equals, push_less_than, push_less_than_or_equals, push_negate, push_not_equals, push_product, push_sum, push_to_cylin, push_to_sphere, add_to_top, get_ub, index_reductum_with_tag_base, push_but_term, push_constant_terms, push_dependent_terms, push_gcd_then_cofactors, push_independent_terms, push_make_proper, push_nonconstant_terms, push_poly_qr, push_standardize, replace_top_with_post_simplified, replace_top2_with_sum