[gmx-developers] Real variables

Erik Marklund erik.marklund at chem.ox.ac.uk
Wed Jul 9 19:56:17 CEST 2014


Dear Jorge,

In order to switch between single and double precision at runtime.

You can do printf("%f\n", (float)real_variable) if %f is crucial.

Kind regards,
Erik

Erik Marklund, PhD
Postdoctoral Research Associate

Department of Chemistry
Physical & Theoretical Chemistry Laboratory
University of Oxford
South Parks Road
Oxford
OX1 3QZ

On 9 Jul 2014, at 17:40, Jorge de Antonio <j.de.antonio at grs-sim.de> wrote:

> Dear developers,
> 
> I was wondering why instead of declaring double variables we are using real. I tried to find where is exactly defined but I didn’t get the file. Can you please provide me some insight? The thing is I want to use fscanf but compiler (gcc) complains because the flag %lf is for double variables.
> 
> Thanks in advance,
> 
> Jorge
> -- 
> Gromacs Developers mailing list
> 
> * Please search the archive at http://www.gromacs.org/Support/Mailing_Lists/GMX-developers_List before posting!
> 
> * Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
> 
> * For (un)subscribe requests visit
> https://maillist.sys.kth.se/mailman/listinfo/gromacs.org_gmx-developers or send a mail to gmx-developers-request at gromacs.org.



More information about the gromacs.org_gmx-developers mailing list