From bug-octave-request at bevo dot che dot wisc dot edu Wed Jan 22 21:03:24 2003 Subject: int2str(x) locks if x==0 et. al. From: "John W. Eaton" To: Paul Gammans Cc: bug-octave at bevo dot che dot wisc dot edu Date: Wed, 22 Jan 2003 21:03:11 -0600 On 17-Jan-2003, Paul Gammans wrote: | ----------- | Bug report for Octave 2.1.43 configured for i386-pc-linux-gnu | | Description: | ----------- | | *1 If you call the function int2str with the value 0 is int2str(0) | the function never return's and locks solid. | | *2 Passing the value inf of -inf or large numbers returns -2147483648 | | *3 Passing the value Nan also locked. | | * Theses where cause by the creation of an invalid fmt string being | passed to sprintf. see seperate bug report | | *4 For Matlab compatablity we should returns NaN and Inf and -Inf for | valuse Nan and Inf and -Inf respectivly and get very confused | for number > 2147483647 or < -2147483647. I fixed this, but using a different method. The changes are checked in to CVS now. Is the following behavior compatible enough? octave:1> int2str ([0, Inf, -Inf, NaN, 123456, 2e10]') ans = 0 Inf -Inf NaN 123456 -2147483648 jwe ------------------------------------------------------------- Octave is freely available under the terms of the GNU GPL. Octave's home on the web: http://www.octave.org How to fund new projects: http://www.octave.org/funding.html Subscription information: http://www.octave.org/archive.html -------------------------------------------------------------