octave-maintainers
[Top][All Lists]
Advanced

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

Re: Expm giving NaN


From: Thomas Weber
Subject: Re: Expm giving NaN
Date: Fri, 28 Sep 2007 12:02:21 +0200

Am Freitag, den 28.09.2007, 11:32 +0200 schrieb David Bateman:
> Marco Caliari wrote:
> > Dear maintainers,
> >
> > the patch against CMatrix.cc in 2.9.14 fixing the "expm giving NaN" bug.
> > Here the result:
> >
> > octave:1> version                        
> > ans = 2.9.14
> > octave:2> expm(1000*i-10)
> > ans = 2.5532e-05 + 3.7540e-05i
> > octave:3> expm([1000*i-10 0;0 1000*i-10])
> > ans =
> >
> >   2.5532e-05 + 3.7540e-05i  0.0000e+00 + 0.0000e+00i
> >   0.0000e+00 + 0.0000e+00i  2.5532e-05 + 3.7540e-05i
> >
> >
> > I also rewrote the computation of the rational approximation avoiding a 
> > matrix-scalar product and including a for loop. I'm not sure if it is 
> > better. 
> >
> > Best regards,
> >
> > Marco
> >   
> 
> Marco,
> 
> John should probably comment on this patch before it is committed, but
> can you resupply to patch as a diff with context. The type of patch you
> sent is difficult to apply if the code has changed (and in fact it has).
> To generate a diff with context, do something like
> 
> diff -u liboctave/CMatrix.cc.orig liboctave/CMatrix.cc

Here's the patch with context: once against 2.9.14 (.diff) and once
against current CVS (.cvs).

        Thomas

Attachment: CMatrix.cvs
Description: Text Data

Attachment: CMatrix.diff
Description: Text Data


reply via email to

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