Skip to Content.
Sympa Menu

forum - Re: [abinit-forum] inverse cube root

forum@abinit.org

Subject: The ABINIT Users Mailing List ( CLOSED )

List archive

Re: [abinit-forum] inverse cube root


Chronological Thread 
  • From: Matthieu Verstraete <mjv500@york.ac.uk>
  • To: forum@abinit.org
  • Subject: Re: [abinit-forum] inverse cube root
  • Date: Thu, 17 Jan 2008 17:15:46 +0000 (GMT)


Hello Xavier - prompt as ever when your code is on the line. The problem is actually not with the routine, but it is being called on a negative
argument:

rho,rhomtrd,rhom1 = -2.796187555105125E-19 NaN -3.5762980139663923E+18
del = 1.808955175498057
NaN NaN
NaN NaN
...

So the initial rho should be filtered: I suspect that the actual routine which does **(1/3.) uses exponentials and logs (obvious) and that someone forgot to check something there. The problem with taking the cube root of a negative appears for pgf90 and gfortran as well (just checked). Python can do it!

Should this be done at all? If so I can commit my patch to 5.5.3, with the absolute value taken and the sign restituted at the end of the loop. The call to invcb comes from the poissonsolver part of the code.

Matthieu




================================================================
Dr. Matthieu Verstraete mailto:mjv500@york.ac.uk
Dept. of Physics, University of York, tel: +44 1904 43 22 08
Heslington, YO10 5DD York, United Kingdom fax: +44 1904 43 22 14




Archive powered by MHonArc 2.6.16.

Top of Page