works for double float complex