octave-maintainers
[Top][All Lists]
Advanced

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

Re: [Pkg-octave-devel] Re: Debian packages for Octave 2.9.10 available i


From: David Bateman
Subject: Re: [Pkg-octave-devel] Re: Debian packages for Octave 2.9.10 available in experimental
Date: Thu, 29 Mar 2007 21:01:08 +0200
User-agent: Thunderbird 1.5.0.7 (X11/20060921)

Rafael Laboissiere wrote:
> * David Bateman <address@hidden> [2007-03-29 16:52]:
>
>   
>> Now this is very strange, though I can't see from this if the problem is
>> coming from the sparse constructor or the element by element division.
>> Can you check and see what output the below gives?
>>
>> af = [1+1i, 2- 1i, 0+0i, 0+0i; 0+0i, 0+0i, 0+0i, 3+2i; 0+0i, 0+0i, 0+0i,
>> 4+0i];
>> bf = [ 0 1 0 0; 2 0 0 0; 3 2 0 0];
>> af ./ bf
>> sparse(af./bf, true)
>> (1+1i)/0
>> (1+1i)./0
>>     
>
> octave2.9:1> af = [1+1i, 2- 1i, 0+0i, 0+0i; 0+0i, 0+0i, 0+0i, 3+2i; 0+0i, 
> 0+0i, 0+0i, 4+0i];
> octave2.9:2> bf = [ 0 1 0 0; 2 0 0 0; 3 2 0 0];
> octave2.9:3> af ./ bf
> ans =
>
>    Inf + Infi     2 -   1i   NaN - NaNi   NaN - NaNi
>      0 +   0i   NaN - NaNi   NaN - NaNi   Inf + Infi
>      0 +   0i     0 +   0i   NaN - NaNi   Inf - NaNi
>
> octave2.9:4> sparse(af./bf, true)
> ans =
>
>    Inf + Infi     2 -   1i   NaN - NaNi   NaN - NaNi
>      0 +   0i   NaN - NaNi   NaN - NaNi   Inf + Infi
>      0 +   0i     0 +   0i   NaN - NaNi   Inf - NaNi
>
> octave2.9:5> (1+1i)/0
> warning: division by zero
> ans = Inf + Infi
> octave2.9:6> (1+1i)./0
> warning: division by zero
> ans = Inf + Infi
>  
>   
Hum, I get Nan +Nani for (1+1i)/0 with g++ 4.0.1... Ok I think this

http://www.nabble.com/inconsistent--a-b-.%5Ex-vs--a%5Ex-b%5Ex--tf3320209.html#a9230186

thread is related to this issue. Given that I understand that your
result isn't the same as mine, However that "sparse(1+1i)./sparse(0)" is
not the same as "(1+1i)/0" I don't understand. They both use the C++
complex class underneath for the division itself...

D.


-- 
David Bateman                                address@hidden
Motorola Labs - Paris                        +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 6 72 01 06 33 (Mob) 
91193 Gif-Sur-Yvette FRANCE                  +33 1 69 35 77 01 (Fax) 

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

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