<div dir="ltr">I just checked my version and result:<div><br></div><div>2.154D-13 + 343.05029i<br></div><div><br></div><div>--> [version, options] = getversion()<br> version = "scilab-6.1.1"<br> options = "VC++" "x64" "tk" "release" "Jul 15 2021" "15:32:10"<br></div><div><br></div><div>Windows 10</div><div><br></div><div>Lester</div><div><br></div><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Wed, 5 Jan 2022 at 13:45, Heinz Nabielek <<a href="mailto:heinznabielek@me.com">heinznabielek@me.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Is there a reason that my round-off error is 2.831D-13 ?<br>
<br>
Is there a way to get SciLab to print always 2.831e-13 so that I can copy numbers over to EXCEL?<br>
<br>
Heinz<br>
<br>
<br>
--> function y=f(z)<br>
> y = exp((z.^2))./(z-2)<br>
> endfunction<br>
<br>
--> fz=intl(0, 2*%pi, 2, 1, f,1e-10) // gives round-off error<br>
fz = 2.831D-13 + 343.05029i<br>
<br>
--> 2*%pi*%i*%e^4<br>
ans = 0. + 343.05029i<br>
<br>
Scilab Version: 6.1.1.988271013<br>
macOS Catalina Version 10.15.7 <br>
<br>
<br>
______________-<br>
<br>
> On 05.01.2022, at 14:31, <a href="mailto:sgougeon@free.fr" target="_blank">sgougeon@free.fr</a> wrote:<br>
> <br>
> Hello Lester,<br>
> <br>
> The integrand is y = exp((z^2))/(z-2), not y = exp((z^2)).<br>
> Then, provided that the (undocumented) absolute tolerance is increased wrt the default one,<br>
> we get the expected result:<br>
> <br>
> --> function y=f(z)<br>
>> y = exp((z.^2))./(z-2)<br>
>> endfunction<br>
> <br>
> --> fz=intl(0, 2*%pi, 2, 1, f,1e-10) // gives round-off error<br>
> fz = <br>
> 4.199D-13 + 343.05029i<br>
> <br>
> --> 2*%pi*%i*%e^4<br>
> ans =<br>
> 0. + 343.05029i<br>
> <br>
> Regards<br>
> Samuel<br>
> <br>
>> ----- Mail d'origine -----<br>
>> De: Lester Anderson<br>
>> Envoyé: Wed, 05 Jan 2022 09:46:47 +0100 (CET)<br>
>> <br>
>> Hello,<br>
>> <br>
>> I am trying to understand how to work the Cauchy integral inputs and<br>
>> replicate the results of a published example:<br>
>> <br>
>> .e.g. Compute the integral of e^(z^2) / (z-2) assumes C is closed<br>
>> (anticlockwise) and z=2 is inside C (a simple circle). The solution should<br>
>> be 2*pi*i*f(2) = 2*pi*i*e^4<br>
>> <br>
>> In Scilab, the solution is defined from the Cauchy Integral (intl):<br>
>> y = intl(a, b, z0, r, f)<br>
>> a and b are real and z complex<br>
>> <br>
>> function y=f(z)<br>
>> y = exp((z^2)) // solution uses f(z) = e^(z^2)<br>
>> endfunction<br>
>> <br>
>> fz=intl(0, 2*%pi, 2+0*%i, 1, f) // gives round-off error<br>
>> // z position +2(real z), 0(imaginary z)<br>
>> <br>
> _______________________________________________<br>
> users mailing list<br>
> <a href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a><br>
> <a href="http://lists.scilab.org/mailman/listinfo/users" rel="noreferrer" target="_blank">http://lists.scilab.org/mailman/listinfo/users</a><br>
<br>
</blockquote></div>