help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: cell2csv (io package): Higher precision of floating point numbers?


From: PhilipNienhuis
Subject: Re: cell2csv (io package): Higher precision of floating point numbers?
Date: Tue, 30 Aug 2016 03:16:06 -0700 (PDT)

Martin Kunz wrote
> Am 24.08.2016 um 17:40 schrieb Ozzy Lash:
>> You may need to increase the size of the tmp variable (right above the
>> sprintf).  With a precision of 16 I think you could get values like:
>>
>> x.xxxxxxxxxxxxxxxxE-xxx
>>
>> which would have 23 characters plus the trailing null.  I'm not sure
>> if it could get bigger than that.
>>
>> Bill
> 
> Good point! Additionally, the number could be negative, so tmp should be
> 25 characters long.

IIRC C++ silently extends strings if assignments overflow the current string
length.

Philip




--
View this message in context: 
http://octave.1599824.n4.nabble.com/cell2csv-io-package-Higher-precision-of-floating-point-numbers-tp4679437p4679532.html
Sent from the Octave - General mailing list archive at Nabble.com.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]