    and LWN = N,   if LYAPUN = 'R' and JOB = 'E' or 'B';
              LWN = 0,   otherwise.
          If FACT = 'N', then
             LDWORK  = MAX(LWA + 5*N, MAX(3,2*N*N) + N*N),
                                              if JOB = 'C';
             LDWORK  = MAX(LWA + 5*N, MAX(3,2*N*N) + 2*N*N + LWN),
                                              if JOB = 'E' or 'B'.
          If FACT = 'F', then
             LDWORK  = MAX(3,2*N*N) + N*N,    if JOB = 'C';
             LDWORK  = MAX(3,2*N*N) + 2*N*N + 