[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Expm giving NaN
From: |
Marco Caliari |
Subject: |
Re: Expm giving NaN |
Date: |
Fri, 28 Sep 2007 13:22:57 +0200 (CEST) |
On Fri, 28 Sep 2007, David Bateman wrote:
> 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
Enclosed.
Best regards,
Marco
CMatrix.diff
Description: Text document