replace_top2_with_difference Function (ROM Call 0x51C)

AMS 2.02 or higher estack.h

void replace_top2_with_difference (ESI expr);

Replace the two top-most expressions on the EStack by their difference.

The following code:

push_quantum(VAR_A_TAG);
ptr = top_estack;
push_quantum(VAR_B_TAG);
replace_top2_with_difference(ptr);
will leave the a - b expression on the EStack.
expr should usually be next_expression_index(top_estack).


Uses: negate_top, replace_top2_with_sum
Used by: get_ub, did_push_anti_deriv, push_1st_derivative, push_acos, push_atan, push_atanh, push_csolve, push_czeros, push_def_int, push_desolve, push_extended_prod, push_factor, push_lim, push_max, push_min, push_nsolve, push_solve, push_summation, push_zeros, push_equals, push_greater_than, push_greater_than_or_equals, push_less_than, push_less_than_or_equals, push_not_equals


See also: replace_top2_with_sum