I have a set of signals $S_1,\dots,S_N$, for which I am numerically computing the Fourier transforms $F_1,\dots,F_N$. Where $S_i$'s and $F_i$'s are C++ vectors (my computations are in C++).

My Computation objective is as follows:

1> compute product: $F = F_1 \times \dots \times F_N$

2> inverse Fourier transform F to get a S.

What I numerically observe is when I am trying to compute the product either I am running into situation where numbers become too small. Or numbers become too big.

I thought of scaling the vector $F_1$ by say a scalar number $a_1$ so that the overflow or underflow is avoided.

With the scaling my step 1 above will become

$F' = (\frac{F_1}{a_1})\times \dots \times(\frac{F_N}{a_N}) = F'_1\times \dots \times F'_N$

And when I inverse transform my final S' will differ from S by a scale factor. The structural form of the S will not change. By this I mean only the normalization of S is different.

My question is :

1> Is my rationale correct.

2> If my rationale is correct then given a C++ vector $F_i$ how can I choose a good scale $a_i$ to scale up or down the $F_i$'s.

Many thanks in advance.

  • $\begingroup$ Use $\frac{a}{b}$ for $\frac{a}{b}$, $\times$ for $\times$, and $\dots$ for $\dots $. $\endgroup$ – Shaun Oct 5 '17 at 13:52
  • $\begingroup$ The computational science SE is probably a more appropriate place for this question. $\endgroup$ – Stelios Oct 5 '17 at 15:21
  • $\begingroup$ Are you using fixed precision? Or you are overflowing with double-precision? $\endgroup$ – AnonSubmitter85 Oct 8 '17 at 19:13

In general, the Fourier transform of a product is equal to the convolution of the Fourier transforms of the factors.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.