Le 30/08/2011 20:38, Peter Rosin a écrit :
Den 2011-08-30 20:18 skrev David Laight:
On Mon, Aug 29, 2011 at 06:43:41PM -0700, Alan W. Irwin wrote:
double x; while(fscanf(stdin, " %le ",&x) == 1)
You are using the wrong format, %le is for 'long double', this will probably overwrite too much data.
Nope, you are mistaken and the OP is correct.
%e float %le double %Le long double
Cheers, Peter
from what I understand, double and long double have the same precision under msvc, while they don't on linux (and gcc) likely a problematic conversion somewhere in the code path A+