help-octave
[Top][All Lists]
Advanced

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

Re: Unequal results when using element-wise and broadcast power operatio


From: Jordi Gutiérrez Hermoso
Subject: Re: Unequal results when using element-wise and broadcast power operations
Date: Fri, 22 Nov 2013 15:12:43 -0500

On Fri, 2013-11-22 at 18:33 +0200, Jose wrote:

> As the subject says, have a look.
> ----------
> clear all
> r=3;
> N=100;
> S=rand(1,N);
> C=S.^r;
> C2=bsxfun(@power,S,r);
> for n=1:N
>    C3(n)=S(n)^r;
> endfor
> assert(C,C2)  %fails
> assert(C,C3)  %fails
> assert(C2,C3) %Does not fail
> ----------

Can you please file a bug report? I have some idea of where the bug
might be, but this seems like a very low-priority thing. I am  trying
to spend my time on stabilising the Octave GUI on Mac OS X right now.

We have other issues with exponentials, for example, how e^X and
expm(X) follow completely different codepaths.

Thanks,
- Jordi G. H.




reply via email to

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