# Delayed evaluation of nested functions

i am new to Mathematica. Here is the situation:

I have a exponential function of n,t that I want to calculate integral over t for different values of n. I want to define this integral as a function of n. I do it with := and it works fine if I provide a number for n but if I put a variable lets say x it tries to evaluate the integral and get an expression of x. This expression leads to precision error and the result for replacing x with a number gives zero at the output which is not correct. This is a sample code that I use:

A[t_]=Exp[-2.005*10^8 t];
B[n_]:=Integrate[A[t] Exp[-4000 I n \[Pi] t], {t, 0, 1/2000}];
B
B[x]


outputs:

General:"Exp[-100250.] is too small to represent as a normalized machine \
number; precision may be lost"
4.98753*10^-9
0. + 0. I


4.9*10^-9 even if not precise is OK for my application.

I have another function as:

C[f_, g_, n_, m_, max_] :=
ParallelSum[(f /. n :> it ) g /. n :> (m - it), {it, -max, max}];


I want to use B and another function for example F in C like

F[x_]=1;
G[m_]=C[B[x/5],F[x],x,m,100];


Now for every m I get zero instead of a very small value. The precision loss is ok for me but I would like to have some value instead of zero to work with in other parts of my application.

If you rationalize A[t] integration works
A[t_] = Exp[-2.005*10^8 t] // Rationalize[#, 0] &;

• The integration by itself works the problem is using C even for a large F for example F[x_] = Exp; I get Exp[-50125.] is too small to represent as a normalized machine number; precision may be lost and 0+0I Aug 23 at 15:16
• @AminGholizad You might increase WorkingPrecision or use an appropriate time scale. Aug 23 at 15:39
• If I do C[B[x],F[x],x,m,100]; it gives zero with precision error but if I do ParallelSum[Integrate[A[t] Exp[-4000 I n \[Pi] t], {t, 0, 1/2000}],F[m-x],{x,-100,100}] it works as expected. Aug 24 at 7:33