From bug-request at octave dot org Mon Feb 7 09:34:28 2005 Subject: Re: Inconsistency in complex division by zero From: David Bateman To: Andy Adler CC: bug at octave dot org Date: Mon, 07 Feb 2005 16:36:21 +0100 Andy Adler wrote: >On Mon, 7 Feb 2005, David Bateman wrote: > > > >>There is an inconsistency in the division by zero between octave and >>matlab. Consider 1i/0 that returns "NaN - NaNi" for octave and "NaN >>-Infi" for matlab. The Matlab return value makes much more sense that >>the octave one as it treats the real and imaginary parts separately.. >>Tested against octave 2.1.64 and matlab 7.0sp1. >> >> > >Matlab 6.5 gives: > > >>>1i/0 >>> >>> >Warning: Divide by zero. >ans = > NaN + Infi > >Which should it be? > > You're right. My fault I typed it in rather than copying it.... 1i/0 is "NaN+Infi" D. -- David Bateman David dot Bateman at motorola dot com Motorola Labs - Paris +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 -------------------------------------------------------------