Re: amber-developers: ptraj precision

From: Robert Duke <rduke.email.unc.edu>
Date: Mon, 5 Feb 2007 23:18:46 -0500

More ancient memories. You may want to consider using strtod() instead,
which is a bit more versatile/robust, at least as I remember from parsing
stuff in c.
Regards - Bob

----- Original Message -----
From: "David A. Case" <case.scripps.edu>
To: <amber-developers.scripps.edu>
Sent: Monday, February 05, 2007 9:05 PM
Subject: Re: amber-developers: ptraj precision


> On Mon, Feb 05, 2007, Thomas Cheatham III wrote:
>>
>> Basic code is sscanf(buffer, "%f", &value). Note that this could all be
>> mute if I get off my butt and fix the character overflow problem (where
>> numbers merge into others in trajectories and choke ptraj) with the
>> atof()
>> fix, as atof() may not do this magic conversion...
>
> atof() indeed returns a double. Just be sure to include <stdlib.h> to get
> the
> proper definition, otherwise the code will think that atof() returns a
> (default) integer.
>
> ...dac
>
>
Received on Wed Feb 07 2007 - 06:07:28 PST
Custom Search