[Intel compiler][Linux] Nan problem

From: Apprenti Debutant (apprentidebutant_at_yahoo.fr)
Date: 02/04/05


Date: 4 Feb 2005 10:02:52 -0800

Hello,

First I would like to apologize for my poor english. I have to face to
a problem that I would like to solve.

Let be a program that has been written few years ago in fortran 90. I
have partially rewritten the code and know I tried to compare the
results given by the old one and the new one. In that code a hankel
transform is computed via a fast hankel transform (Algorithm 588 from
ACM).

Both codes have been compiled using the Intel Fortran compiler for
32-bit applications version 8.1 Build 20041019Z Package ID:
l_fc_pu_8.1.021. One (the old one) is going through the hankel
transform without any problem but the new one crash.

After some hours I think that I have found where the problem is but I
do not know how to solve it. At the end of the message the output the
code juste before the crash. The first column is the integration
variable k and the second column is a part f(k) (exponentialy
decreasing with respect to the integration variable) of the function
to be integrated. As you can see in the old code when k increase f(k)
goes to zero (which is normal) but in the new code instead of stopping
at (0.,0) I got a NaN. I thought that a NaN appears when you try to
divide A/B with A=0 and B=0 but in my case f(k) is the substraction of
two exponentialy decreasing functions.

Do You have any idea to overcome this problem ?

Thank you in advance for your help and have a nice WE,

 
  L'appenti débutant

 

Output of the old code
   2210.786 (524.5057,95.05350)
   2700.260 (403.2547,65.37638)
   3298.105 (279.6035,39.52051)
   4028.315 (170.7313,20.66542)
   4920.195 (89.26336,9.138274)
   6009.539 (38.62191,3.315619)
   7340.068 (13.26630,0.9494179)
   8965.179 (3.438428,0.2042981)
   10950.09 (0.6319523,3.1082707E-02)
   13374.48 (7.6338604E-02,3.1014946E-03)
   16335.62 (5.5237589E-03,1.8506707E-04)
   19952.37 (2.1375317E-04,5.8978976E-06)
   24369.88 (3.8514104E-06,8.7423409E-08)
   29765.44 (2.7281786E-08,5.0900689E-10)
   36355.59 (6.1789796E-11,9.4689198E-13)
   44404.82 (3.4762557E-14,4.3729529E-16)
   54236.17 (3.5690664E-18,3.6837493E-20)
   66244.21 (4.5885915E-23,3.8843472E-25)
   80910.86 (4.6635557E-29,3.2368349E-31)
   98824.75 (0.0000000E+00,0.0000000E+00)

Output of the new code
 k 2210.786 (524.5057,95.05348)
 k 2700.260 (403.2547,65.37637)
 k 3298.105 (279.6035,39.52050)
 k 4028.315 (170.7313,20.66542)
 k 4920.195 (89.26336,9.138273)
 k 6009.539 (38.62191,3.315619)
 k 7340.068 (13.26630,0.9494178)
 k 8965.179 (3.438428,0.2042980)
 k 10950.09 (0.6319523,3.1082703E-02)
 k 13374.48 (7.6338612E-02,3.1014944E-03)
 k 16335.62 (5.5237589E-03,1.8506705E-04)
 k 19952.37 (2.1375317E-04,5.8978981E-06)
 k 24369.88 (3.8514104E-06,8.7423395E-08)
 k 29765.44 (2.7281786E-08,5.0900689E-10)
 k 36355.59 (6.1789802E-11,9.4689187E-13)
 k 44404.82 (3.4762557E-14,4.3729524E-16)
 k 54236.17 (3.5690664E-18,3.6837490E-20)
 k 66244.21 (4.5885915E-23,3.8843467E-25)
 k 80910.86 (4.6635557E-29,3.2368347E-31)
 k 98824.75 (NaN,NaN)



Relevant Pages

  • Re: Integral equation
    ... derivatives of Kusing repeated integration by parts, and then ... that picks off Win the complex plane (like a hilbert transform ... The kernel is used to "transform" a function, ... solving Laplace's equation with a condition on the function u(r, theta) ...
    (sci.math)
  • Re: Why Fourier and Laplace transforms?
    ... > that he doesn't mean Gto be the Laplace transform of f? ... that's only a matter of notation. ... >> involves distributions, but one needn't use them by all means. ... I'll not discuss which kind of integration here, ...
    (sci.math)
  • Re: Lightning and Fourier transform of an impulse
    ... transform for that amount of time, ... audio output for the same amount of time, ... zero outside the integration time. ... integration is not zero, but a repeate of whatever you integrated. ...
    (comp.dsp)
  • Re: Why? [was Re: Cantor`s powerset theorem is false?]
    ... Surely you agree that measure theory and integration is ... of any countable set of reals is zero. ... or discontinuous, then doing a transform, and then an inverse ... Under this definition of equivalence, ...
    (sci.logic)