From owner-bug-octave at bevo dot che dot wisc dot edu Wed Dec 18 16:13:05 1996 Subject: Re: fscanf reads strange values on Octave 2.0 /linux From: "John W. Eaton" To: Tapani Stipa Cc: bug-octave at bevo dot che dot wisc dot edu Date: Wed, 18 Dec 1996 16:12:26 -0600 On 18-Dec-1996, Tapani Stipa wrote: : As a first number in my data file, I have the date 9508150000. When I : try to read this as a floating point number into Octave, it gives : 9508150272. When I read it as a string, it is fine. : : I think the significant digits should suffice for this? For a double, yes. For a float, no. If you use "%lf", I think you will get the result you expect. However, I'm not sure that Octave should try to follow the semantics of C this closely. Perhaps it would be more useful if "%f" and "%lf" were equivalent. Does anyone have any strong opinions either way? Thanks, jwe