[gmx-users] template.c

Chandan Choudhury iitdckc at gmail.com
Tue Jun 1 16:59:18 CEST 2010


The suggestions were very helpful.
Thanks

Chandan

--
Chandan kumar Choudhury
NCL, Pune
INDIA


On Sun, May 30, 2010 at 11:32 PM, Tsjerk Wassenaar <tsjerkw at gmail.com>wrote:

> Hi Chandan,
>
> The problem is that with floating points the equality in
>
> >  if (fr.time == (4000.000 + (50.0 * inc)))
>
> is very unlikely to be satisfied at any time. To compare floating
> point numbers, you'll have to check whether the value is within a
> certain interval. But Jussi's approach is far more convenient in this
> particular case.
>
> Cheers,
>
> Tsjerk
>
> --
> Tsjerk A. Wassenaar, Ph.D.
>
> post-doctoral researcher
> Molecular Dynamics Group
> Groningen Institute for Biomolecular Research and Biotechnology
> University of Groningen
> The Netherlands
> --
> gmx-users mailing list    gmx-users at gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-users
> Please search the archive at http://www.gromacs.org/search before posting!
> Please don't post (un)subscribe requests to the list. Use the
> www interface or send it to gmx-users-request at gromacs.org.
> Can't post? Read http://www.gromacs.org/mailing_lists/users.php
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://maillist.sys.kth.se/pipermail/gromacs.org_gmx-users/attachments/20100601/85583e8d/attachment.html>


More information about the gromacs.org_gmx-users mailing list