# Questions tagged [complex-arithmetic]

For questions about implementing and using complex arithmetic operations.

23 questions
Filter by
Sorted by
Tagged with
54 views

### Finding best phase in least-squares manner

I have the following problem: $$argmin_{\vec{x},\phi}||A\vec{x}-\vec{y}e^{j\phi}||_2^2$$ Here, $x$ and $y$ are vectors and $\phi$ is a constant phase factor that applies to the all entries of $y$. I ...
• 23
1 vote
62 views

### Does the choice of a complex inner product affect Krylov methods?

As far as I understand there are two definitions of the complex inner product: $$(a,b) = b^H a$$ and $$(a,b) = a^H b$$ I know some linear algebra libraries such as BLAS and Eigen uses the second one. ...
48 views

### Simplification of complex amplitudes

In a previous answer the following identity was presented $$-i \vec \kappa \exp^{[i\vec \kappa \cdot (\vec r_j - \vec r_i)]} = -\vec \kappa \sin[\vec \kappa \cdot (\vec r_j - \vec r_i)] \, .$$ Why ...
1 vote
69 views

### Why does this implementation for Eisenstein integer pairs of Euclid's method for finding greatest common denominators get stuck for this one point?

My Math SE question determining if a coincident point in a pair of rotated hexagonal lattices is closest to the origin? explains the problem I have. I won't reproduce the whole thing in detail here, ...
• 1,026
446 views

• 173
655 views

### Danger of complex arithmetic in scientific computing

The complex inner product $\langle u,v\rangle$ has two different definitions decided by conventions: $\bar{u}^Tv$ or $u^T\bar{v}$. In BLAS, I found the routines ...
• 1,319
1 vote
294 views

### OpenMP threaded nonlinear solver for complex numbers

Problem: I have translated Jacobian-Free Newton-Krylov solver written by C. T. Kelley to Fortran and now want to parallelize it on a shared-memory system with OpenMP. In addition, I want to ...
• 11
533 views

### Reference BLAS/LAPACK from NETLIB is twice as fast as MKL for complex numbers

I'm solving the Helmholtz equation using PETSc. I found with the PETSc configure option --download-f-blas-lapack my program runs twice as fast over running it with ...
• 1,319
2k views

### Why would a computational scientist need to implement their own version of std::complex?

Many of the better-known C++ libraries in computational science such as Eigen, Trilinos, and deal.II use the standard C++ template header library object, ...
• 6,931