From bug-request at octave dot org Thu Jan 27 11:22:47 2005 Subject: Re: dec2base From: David Bateman To: "John W. Eaton" Cc: Paul Kienzle , Yassine Boujelben , Andre Girard , bug-octave@bevo.che.wisc.edu Date: Thu, 27 Jan 2005 18:24:08 +0100 John W. Eaton wrote: >On 4-Jan-2005, Paul Kienzle wrote: > >| On Jan 3, 2005, at 3:58 PM, Yassine Boujelben wrote: >| >| > I found the following bug in the dec2base function: >| > dec2base(1000,10)=000 >| >| Try the attached patch. >| > > John/Paul, This version will fail for me for the case dec2base(2^51-1,2), and results in an additional 0 in the string. There are probably many similar cases that are less drastic. Given that it is the "-1" in this case does change the value of the log, I see no solution, but the one I proposed. Though correct me if I'm wrong. D. -- David Bateman David dot Bateman at motorola dot com Motorola CRM +33 1 69 35 48 04 (Ph) Parc Les Algorithmes, Commune de St Aubin +33 1 69 35 77 01 (Fax) 91193 Gif-Sur-Yvette FRANCE The information contained in this communication has been classified as: [x] General Business Information [ ] Motorola Internal Use Only [ ] Motorola Confidential Proprietary ------------------------------------------------------------- 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 -------------------------------------------------------------