Re: amber-developers: ptraj precision

From: Thomas Cheatham III <>
Date: Mon, 5 Feb 2007 15:37:48 -0700 (Mountain Standard Time)

> input trajectory file:
> 18.438 29.157 33.019 18.614 28.133 32.690
> output restart from ptraj:
> 18.4379997 29.1569996 33.0190010 18.6140003 28.1329994 32.6899986

As a follow-up to this, Scott or Ross or Bob do you know about IEEE
conversions and all that hidden magic that likely causes this, i.e. is
there a compiler option to prevent it?

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...

Regardless, do any of you "C" guru's know about this precision adaption
and conversion of a sensible xxx.123 value into xxx.12299997 value?

Received on Wed Feb 07 2007 - 06:07:25 PST
Custom Search