[Scilab-users] Cauchy Integral query

Lester Anderson arctica1963 at gmail.com
Wed Jan 5 17:39:04 CET 2022


I just checked my version and result:

2.154D-13 + 343.05029i

--> [version, options] = getversion()
 version  =  "scilab-6.1.1"
 options  =  "VC++"  "x64"  "tk"  "release"  "Jul 15 2021"  "15:32:10"

Windows 10

Lester



On Wed, 5 Jan 2022 at 13:45, Heinz Nabielek <heinznabielek at me.com> wrote:

> Is there a reason that my round-off error is 2.831D-13 ?
>
> Is there a way to get SciLab to print always 2.831e-13 so that I can copy
> numbers over to EXCEL?
>
> Heinz
>
>
> --> function y=f(z)
>   >     y = exp((z.^2))./(z-2)
>   > endfunction
>
> -->  fz=intl(0, 2*%pi, 2, 1, f,1e-10) // gives round-off error
>  fz  =    2.831D-13 + 343.05029i
>
> --> 2*%pi*%i*%e^4
>  ans  =    0. + 343.05029i
>
> Scilab Version: 6.1.1.988271013
> macOS Catalina Version 10.15.7
>
>
> ______________-
>
> > On 05.01.2022, at 14:31, sgougeon at free.fr wrote:
> >
> > Hello Lester,
> >
> > The integrand is y = exp((z^2))/(z-2), not y = exp((z^2)).
> > Then, provided that the (undocumented) absolute tolerance is increased
> wrt the default one,
> > we get the expected result:
> >
> > --> function y=f(z)
> >>  y = exp((z.^2))./(z-2)
> >> endfunction
> >
> > --> fz=intl(0, 2*%pi, 2, 1, f,1e-10) // gives round-off error
> > fz  =
> >   4.199D-13 + 343.05029i
> >
> > --> 2*%pi*%i*%e^4
> > ans  =
> >   0. + 343.05029i
> >
> > Regards
> > Samuel
> >
> >> ----- Mail d'origine -----
> >> De: Lester Anderson
> >> Envoyé: Wed, 05 Jan 2022 09:46:47 +0100 (CET)
> >>
> >> Hello,
> >>
> >> I am trying to understand how to work the Cauchy integral inputs and
> >> replicate the results of a published example:
> >>
> >> .e.g. Compute the integral of e^(z^2) / (z-2) assumes C is closed
> >> (anticlockwise) and z=2 is inside C (a simple circle). The solution
> should
> >> be 2*pi*i*f(2) = 2*pi*i*e^4
> >>
> >> In Scilab, the solution is defined from the Cauchy Integral (intl):
> >> y = intl(a, b, z0, r, f)
> >> a and b are real and z complex
> >>
> >> function y=f(z)
> >>  y = exp((z^2)) // solution uses f(z) =  e^(z^2)
> >> endfunction
> >>
> >> fz=intl(0, 2*%pi, 2+0*%i, 1, f) // gives round-off error
> >> // z position +2(real z), 0(imaginary z)
> >>
> > _______________________________________________
> > users mailing list
> > users at lists.scilab.org
> > http://lists.scilab.org/mailman/listinfo/users
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.scilab.org/pipermail/users/attachments/20220105/09f6ded3/attachment.htm>


More information about the users mailing list