| compare_complex_magnitudes | Function (ROM Call 0x2F6)

AMS 1.01 or higher | estack.h

short compare_complex_magnitudes (CESI ptr1, CESI ptr2);

Compares magnitudes of two complex number entries on the expression stack.

compare_complex_magnitudes compares two complex number entries (which may be real also) on the expression stack pointed to by ptr1 and ptr2, and returns a value which is

- < 0 if the magnitude of the number pointed to by ptr1 is less than the magnitude of the number pointed to by ptr2
- == 0 if the magnitude of the number pointed to by ptr1 is the same as the magnitude of the number pointed to by ptr2
- > 0 if the magnitude of the number pointed to by ptr1 is greater than the magnitude of the number pointed to by ptr2

Uses: check_estack_size, delete_between, estack_number_to_Float, next_expression_index, push_between, push_expression, push_Float, push_quantum, top_estack, push_abs, push_square, ST_helpMsg, XR_stringPtr, compare_numbers, primary_tag_list, replace_top2_with_sum, _bcd_math, _du16u16, _ds32s32, _ms32s32, ROM Call 0x4EC