GeneralizedEigenvaluesComplex Task:

Given two matrices A and B, where:
  - A and B are arbitrary real n x n matrices,
the task is to solve the generalized eigenvalue problem:

    A · x = λ B · x

The eigenvalues are not necessarily real; they may be complex.
The goal is to compute the approximated eigenvalues and return them sorted in descending order.
The sorting order is defined as follows: first by the real part (in descending order), then by the imaginary part (in descending order).
A valid solution is a list of n numbers (complex or real) sorted according to this ordering.

Input: Two matrices A and B represented as a list of n lists of real numbers each.
  - A and B are arbitrary (not necessarily symmetric).

Example input:
A = [
    [1.0, 2.0],
    [3.0, 4.0]
]
B = [
    [2.0, 0.5],
    [1.5, 3.0]
]

Output: A list of approximated eigenvalues (which may be complex) sorted in descending order.

Example output:
[(5.2+0.3j), (0.8-0.3j)]

Category: matrix_operations