* Bug #6512 fixed - %asn function tagged as obsolete. 10/13610/2
Charlotte HECQUET [Thu, 30 Jan 2014 14:44:55 +0000 (15:44 +0100)]
Change-Id: Iec302b3383a732f8cf1b16acf5102d0110184e43

28 files changed:
scilab/CHANGES_5.5.X
scilab/modules/helptools/etc/images_md5.txt
scilab/modules/helptools/images/barhomogenize_2.png
scilab/modules/helptools/images/ell1mag_1.png
scilab/modules/helptools/images/plot_13.png
scilab/modules/helptools/images/plot_14.png
scilab/modules/signal_processing/help/en_US/filters/ell1mag.xml
scilab/modules/signal_processing/help/ja_JP/filters/ell1mag.xml
scilab/modules/signal_processing/macros/%asn.sci
scilab/modules/signal_processing/macros/findm.sci
scilab/modules/signal_processing/macros/zpell.sci
scilab/modules/signal_processing/tests/nonreg_tests/bug_6512.dia.ref [new file with mode: 0644]
scilab/modules/signal_processing/tests/nonreg_tests/bug_6512.tst [new file with mode: 0644]
scilab/modules/special_functions/help/en_US/amell.xml
scilab/modules/special_functions/help/en_US/delip.xml
scilab/modules/special_functions/help/en_US/percentasn.xml
scilab/modules/special_functions/help/en_US/percentk.xml
scilab/modules/special_functions/help/en_US/percentsn.xml
scilab/modules/special_functions/help/fr_FR/amell.xml
scilab/modules/special_functions/help/fr_FR/delip.xml
scilab/modules/special_functions/help/ja_JP/amell.xml
scilab/modules/special_functions/help/ja_JP/delip.xml
scilab/modules/special_functions/help/ja_JP/percentk.xml
scilab/modules/special_functions/help/ja_JP/percentsn.xml
scilab/modules/special_functions/help/pt_BR/amell.xml
scilab/modules/special_functions/help/pt_BR/delip.xml
scilab/modules/special_functions/help/ru_RU/amell.xml
scilab/modules/special_functions/help/ru_RU/delip.xml

index 78d88e5..c2ed44f 100644 (file)
@@ -680,6 +680,9 @@ Obsolete & Removed Functions
 * regress tagged as obsolete. Will be removed in Scilab 5.5.1.
   Please use reglin instead.
 
+* %asn tagged as obsolete. Will be removed in Scilab 5.5.1.
+  Please use delip instead.
+
 
 Scilab Bug Fixes
 ================
@@ -741,6 +744,8 @@ Scilab Bug Fixes
 
 * Bug #6466 fixed - Example with vectorized input added in mprintf and msprintf help pages.
 
+* Bug #6512 fixed - %asn function tagged as obsolete.
+
 * Bug #6638 fixed - The profiler output was incorrect by a factor of 1000 under Windows.
 
 * Bug #6693 fixed - modulo did not accept polynomial inputs. Help page was not updated.
index 159d624..33e1069 100644 (file)
@@ -820,7 +820,7 @@ dsearch_3.png=53954438cd5b4a62b3fb8687c66514e4
 dsearch_fr_FR_1.png=c514bed6d16e460572895227f3e86f14
 dsearch_fr_FR_2.png=fafbfb1fd80337e9567602ea7c1f01d0
 dsearch_fr_FR_3.png=baf82271411b092b792e67c4ebd25e1
-ell1mag_1.png=f7ce02603b04993e49aedf144db15915
+ell1mag_1.png=640c2b3e2643588f62860bcd7add7ef5
 eqfir_1.png=ccaf8d9b3be54b01b15910cd2935ed94
 erfinv_1.png=a9c079e2216ea843f529d8fa1af6a38d
 errbar_1.png=f0db95118951d4c04c3bde7c93e2fa2e
index 69a6e68..4904fd8 100644 (file)
Binary files a/scilab/modules/helptools/images/barhomogenize_2.png and b/scilab/modules/helptools/images/barhomogenize_2.png differ
index afcafc5..f123ce4 100644 (file)
Binary files a/scilab/modules/helptools/images/ell1mag_1.png and b/scilab/modules/helptools/images/ell1mag_1.png differ
index c4bee4c..f2652ce 100644 (file)
Binary files a/scilab/modules/helptools/images/plot_13.png and b/scilab/modules/helptools/images/plot_13.png differ
index ccc705f..fa10aa1 100644 (file)
Binary files a/scilab/modules/helptools/images/plot_14.png and b/scilab/modules/helptools/images/plot_14.png differ
index 9023a3b..b54bf1c 100644 (file)
@@ -60,10 +60,10 @@ m1=(epsilon*epsilon)/(A*A-1);n=5;omegac=6;
 m=find_freq(epsilon,A,n);omegar = omegac/sqrt(m)
 %k(1-m1)*%k(m)/(%k(m1)*%k(1-m))-n   //Check...
 [alpha,Beta]=alpha_beta(n,m,m1)
-alpha*%asn(1,m)-n*%k(m1)      //Check
+alpha*delip(1,sqrt(m))-n*%k(m1)      //Check
 samples=0:0.01:20;
 //Now we map the positive real axis into the contour...
-z=alpha*%asn(samples/omegac,m)+Beta*ones(samples);
+z=alpha*delip(samples/omegac,sqrt(m))+Beta*ones(samples);
 plot(samples,ell1mag(epsilon,m1,z))
  ]]></programlisting>
         <scilab:image><![CDATA[
@@ -75,10 +75,10 @@ m1=(epsilon*epsilon)/(A*A-1);n=5;omegac=6;
 m=find_freq(epsilon,A,n);omegar = omegac/sqrt(m)
 %k(1-m1)*%k(m)/(%k(m1)*%k(1-m))-n   //Check...
 [alpha,Beta]=alpha_beta(n,m,m1)
-alpha*%asn(1,m)-n*%k(m1)      //Check
+alpha*delip(1,sqrt(m))-n*%k(m1)      //Check
 samples=0:0.01:20;
 //Now we map the positive real axis into the contour...
-z=alpha*%asn(samples/omegac,m)+Beta*ones(samples);
+z=alpha*delip(samples/omegac,sqrt(m))+Beta*ones(samples);
 plot(samples,ell1mag(epsilon,m1,z))
 ]]>     </scilab:image>
     </refsection>
index fc65eeb..4b1d86e 100644 (file)
@@ -61,10 +61,10 @@ m1=(epsilon*epsilon)/(A*A-1);n=5;omegac=6;
 m=find_freq(epsilon,A,n);omegar = omegac/sqrt(m)
 %k(1-m1)*%k(m)/(%k(m1)*%k(1-m))-n   //チェック...
 [alpha,Beta]=alpha_beta(n,m,m1)
-alpha*%asn(1,m)-n*%k(m1)      //チェック
+alpha*delip(1,sqrt(m))-n*%k(m1)      //チェック
 sample=0:0.01:20;
 //等高線に正の実軸をマップ...
-z=alpha*%asn(sample/omegac,m)+Beta*ones(sample);
+z=alpha*delip(sample/omegac,sqrt(m))+Beta*ones(sample);
 plot(sample,ell1mag(epsilon,m1,z))
  ]]></programlisting>
     </refsection>
index 63f2d06..065a5bd 100644 (file)
@@ -17,6 +17,7 @@ function [y]=%asn(x,m)
     //  y :Value of the integral
     //
     //!
+    warnobsolete("delip","5.5.1");
     m=real(m);
 
     if m<0|m>1 then
index 3603f37..f5b5d0d 100644 (file)
@@ -20,8 +20,8 @@ function m=findm(chi)
         while abs(t-tn) > 10.*%eps
             t=tn;
             lln=log(16/(1-m));
-            k1=%asn(1,1-m);
-            k=%asn(1,m);
+            k1=delip(1,sqrt(1-m));
+            k=delip(1,sqrt(m));
             y=(k1*lln/%pi)-k;
             mn=m;
             m=1-v*exp((-%pi*y)/k1);
@@ -36,8 +36,8 @@ function m=findm(chi)
         while abs(t-tn) > 10.*%eps
             t=tn;
             lln=log(16/m);
-            k1=%asn(1,1-m);
-            k=%asn(1,m);
+            k1=delip(1,sqrt(1-m));
+            k=delip(1,sqrt(m));
             y=(k*lln/%pi)-k1;
             mn=m;
             m=v*exp((-%pi*y)/k);
index cdd4308..ef3b908 100644 (file)
@@ -23,14 +23,14 @@ function [ze,po,gain]=zpell(epsilon,A,omegac,omegar)
     //!
 
     m1=(epsilon*epsilon)/(A*A-1);
-    K1=%asn(1,m1);
-    K1t=imag(%asn(1/sqrt(m1),m1));
+    K1=delip(1,sqrt(m1));
+    K1t=imag(delip(1/sqrt(m1),sqrt(m1)));
     m=(omegac/omegar)^2;
-    K=%asn(1,m);
-    Kt=imag(%asn(1/sqrt(m),m));
+    K=delip(1,sqrt(m));
+    Kt=imag(delip(1/sqrt(m),sqrt(m)));
     n=(K1t*K)/(K1*Kt);
     order=round(n);
-    u0=-(Kt/K1t)*%asn(sqrt(1/(1+epsilon*epsilon)),1-m1);
+    u0=-(Kt/K1t)*delip(sqrt(1/(1+epsilon*epsilon)),sqrt(1-m1));
     even=2*int(order/2);
     if order<>even then,
         vmin=2*K/n;
diff --git a/scilab/modules/signal_processing/tests/nonreg_tests/bug_6512.dia.ref b/scilab/modules/signal_processing/tests/nonreg_tests/bug_6512.dia.ref
new file mode 100644 (file)
index 0000000..25cb819
--- /dev/null
@@ -0,0 +1,62 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2014 - Scilab Enterprises - Charlotte HECQUET
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+// <-- CLI SHELL MODE -->
+// <-- Non-regression test for bug 6512 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=6512
+//
+// <-- Short Description -->
+// %asn tagged as obsolete
+// Check that findm is still ok
+res = findm(1);
+assert_checktrue(%k(1-res)/%k(res)-1<1e-8);
+res = findm(0.1);
+assert_checktrue(%k(1-res)/%k(res)-0.1<1e-8);
+res = findm(0.5);
+assert_checktrue(%k(1-res)/%k(res)-0.5<1e-8);
+// Check that zpell is still ok
+gain_ref=0.4818507;
+po_ref=[-68.292059+161.54792*%i -68.292059-161.54792*%i];
+ze_ref=[250.20121*%i, -250.20121*%i];
+[ze,po,gain]=zpell(0.2,2,100,200);
+assert_checktrue(abs(ze-ze_ref)<1e-5);
+assert_checktrue(abs(po-po_ref)<1e-5);
+assert_checktrue(abs(gain-gain_ref)<1e-5);
+gain_ref=0.3553711;
+po_ref=[-157.37848+228.46667*%i,-157.37848-228.46667*%i];
+ze_ref=[464.22153*%i -464.22153*%i];
+[ze,po,gain]=zpell(0.1,3,150,300);
+assert_checktrue(abs(ze-ze_ref)<1e-5);
+assert_checktrue(abs(po-po_ref)<1e-5);
+assert_checktrue(abs(gain-gain_ref)<1e-5);
+gain_ref=0.1880517;
+po_ref=[-74.045505+159.77986*%i,-74.045505-159.77986*%i];
+ze_ref=[384.0618*%i -384.0618*%i];
+[ze,po,gain]=zpell(0.5,5,150,300);
+assert_checktrue(abs(ze-ze_ref)<1e-5);
+assert_checktrue(abs(po-po_ref)<1e-5);
+assert_checktrue(abs(gain-gain_ref)<1e-5);
+gain_ref=0.1656341;
+po_ref=[-43.753882+156.42721*%i -43.753882-156.42721*%i];
+ze_ref=[344.09218*%i -344.09218*%i];
+[ze,po,gain]=zpell(0.9,5,150,300);
+assert_checktrue(abs(ze-ze_ref)<1e-5);
+assert_checktrue(abs(po-po_ref)<1e-5);
+assert_checktrue(abs(gain-gain_ref)<1e-5);
+// Check example in ell1mag help page
+deff('[alpha,BeTa]=alpha_beta(n,m,m1)',...
+'if 2*int(n/2)==n then, BeTa=K1; else, BeTa=0;end;...
+alpha=%k(1-m1)/%k(1-m);')
+epsilon=0.1;A=10;
+m1=(epsilon*epsilon)/(A*A-1);n=5;omegac=6;
+m=find_freq(epsilon,A,n);omegar = omegac/sqrt(m);
+[alpha,Beta]=alpha_beta(n,m,m1);
+assert_checktrue(abs(alpha*delip(1,sqrt(m))-n*%k(m1)-3.553e-15)<1e-6);
+// Check example in %k help page
+ref=1.7775194;
+assert_checktrue(abs(delip(1,sqrt(0.4))-ref)<1e-5);
diff --git a/scilab/modules/signal_processing/tests/nonreg_tests/bug_6512.tst b/scilab/modules/signal_processing/tests/nonreg_tests/bug_6512.tst
new file mode 100644 (file)
index 0000000..3e57299
--- /dev/null
@@ -0,0 +1,68 @@
+// =============================================================================
+// Scilab ( http://www.scilab.org/ ) - This file is part of Scilab
+// Copyright (C) 2014 - Scilab Enterprises - Charlotte HECQUET
+//
+//  This file is distributed under the same license as the Scilab package.
+// =============================================================================
+
+// <-- CLI SHELL MODE -->
+
+// <-- Non-regression test for bug 6512 -->
+//
+// <-- Bugzilla URL -->
+// http://bugzilla.scilab.org/show_bug.cgi?id=6512
+//
+// <-- Short Description -->
+// %asn tagged as obsolete
+// Check that findm is still ok
+
+res = findm(1);
+assert_checktrue(%k(1-res)/%k(res)-1<1e-8);
+res = findm(0.1);
+assert_checktrue(%k(1-res)/%k(res)-0.1<1e-8);
+res = findm(0.5);
+assert_checktrue(%k(1-res)/%k(res)-0.5<1e-8);
+
+// Check that zpell is still ok
+gain_ref=0.4818507;
+po_ref=[-68.292059+161.54792*%i -68.292059-161.54792*%i];
+ze_ref=[250.20121*%i, -250.20121*%i];
+[ze,po,gain]=zpell(0.2,2,100,200);
+assert_checktrue(abs(ze-ze_ref)<1e-5);
+assert_checktrue(abs(po-po_ref)<1e-5);
+assert_checktrue(abs(gain-gain_ref)<1e-5);
+gain_ref=0.3553711;
+po_ref=[-157.37848+228.46667*%i,-157.37848-228.46667*%i];
+ze_ref=[464.22153*%i -464.22153*%i];
+[ze,po,gain]=zpell(0.1,3,150,300);
+assert_checktrue(abs(ze-ze_ref)<1e-5);
+assert_checktrue(abs(po-po_ref)<1e-5);
+assert_checktrue(abs(gain-gain_ref)<1e-5);
+gain_ref=0.1880517;
+po_ref=[-74.045505+159.77986*%i,-74.045505-159.77986*%i];
+ze_ref=[384.0618*%i -384.0618*%i];
+[ze,po,gain]=zpell(0.5,5,150,300);
+assert_checktrue(abs(ze-ze_ref)<1e-5);
+assert_checktrue(abs(po-po_ref)<1e-5);
+assert_checktrue(abs(gain-gain_ref)<1e-5);
+gain_ref=0.1656341;
+po_ref=[-43.753882+156.42721*%i -43.753882-156.42721*%i];
+ze_ref=[344.09218*%i -344.09218*%i];
+[ze,po,gain]=zpell(0.9,5,150,300);
+assert_checktrue(abs(ze-ze_ref)<1e-5);
+assert_checktrue(abs(po-po_ref)<1e-5);
+assert_checktrue(abs(gain-gain_ref)<1e-5);
+
+// Check example in ell1mag help page
+deff('[alpha,BeTa]=alpha_beta(n,m,m1)',...
+'if 2*int(n/2)==n then, BeTa=K1; else, BeTa=0;end;...
+alpha=%k(1-m1)/%k(1-m);')
+epsilon=0.1;A=10;
+m1=(epsilon*epsilon)/(A*A-1);n=5;omegac=6;
+m=find_freq(epsilon,A,n);omegar = omegac/sqrt(m);
+[alpha,Beta]=alpha_beta(n,m,m1);
+assert_checktrue(abs(alpha*delip(1,sqrt(m))-n*%k(m1)-3.553e-15)<1e-6);
+
+// Check example in %k help page
+ref=1.7775194;
+assert_checktrue(abs(delip(1,sqrt(0.4))-ref)<1e-5);
index 2183e29..ad77edb 100644 (file)
@@ -60,9 +60,6 @@
             <member>
                 <link linkend="percentsn">%sn</link>
             </member>
-            <member>
-                <link linkend="percentasn">%asn</link>
-            </member>
         </simplelist>
     </refsection>
 </refentry>
index ccde4a7..193e2f3 100644 (file)
@@ -139,9 +139,6 @@ intg(0,1,f)    //OK since real solution!
                 <link linkend="amell">amell</link>
             </member>
             <member>
-                <link linkend="percentasn">%asn</link>
-            </member>
-            <member>
                 <link linkend="percentsn">%sn</link>
             </member>
         </simplelist>
index bf2c43c..982b0b4 100644 (file)
@@ -2,7 +2,9 @@
 <refentry xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:svg="http://www.w3.org/2000/svg" xmlns:mml="http://www.w3.org/1998/Math/MathML" xmlns:db="http://docbook.org/ns/docbook" xmlns:scilab="http://www.scilab.org" xml:lang="en" xml:id="percentasn">
     <refnamediv>
         <refname>%asn</refname>
-        <refpurpose>elliptic integral</refpurpose>
+        <refpurpose>
+            elliptic integral. <emphasis role="bold">This function is obsolete.</emphasis>
+        </refpurpose>
     </refnamediv>
     <refsynopsisdiv>
         <title>Calling Sequence</title>
@@ -43,6 +45,8 @@
         <para>
             If <literal>x</literal> is a vector, <literal>y</literal> is a vector of same dimension as <literal>x</literal>.
         </para>
+        <warning>This function is obsolete.</warning>
+        It is better to use <link linkend="delip">delip</link> instead of function <function>%asn</function>.
     </refsection>
     <refsection>
         <title>Examples</title>
@@ -78,4 +82,23 @@ intg(0,0.9,f)-%asn(0.9,m)  //Works for real case only!
             plot2d(real(y)',imag(y)',1,'011',' ',rect)
         </scilab:image>
     </refsection>
+    <refsection role="see also">
+        <title>See Also</title>
+        <simplelist type="inline">
+            <member>
+                <link linkend="delip">delip</link>
+            </member>
+        </simplelist>
+    </refsection>
+    <refsection>
+        <title>History</title>
+        <revhistory>
+            <revision>
+                <revnumber>5.5.0</revnumber>
+                <revdescription>
+                    Function tagged as obsolete. Will be removed in 5.5.1. Please use <link linkend="delip">delip</link> instead.
+                </revdescription>
+            </revision>
+        </revhistory>
+    </refsection>
 </refentry>
index 6a573f7..a57a3d8 100644 (file)
@@ -44,7 +44,7 @@
         <title>Examples</title>
         <programlisting role="example"><![CDATA[ 
 m=0.4;
-%asn(1,m)
+delip(1,sqrt(m))
 %k(m)
  ]]></programlisting>
     </refsection>
@@ -52,7 +52,7 @@ m=0.4;
         <title>See Also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="percentasn">%asn</link>
+                <link linkend="delip">delip</link>
             </member>
         </simplelist>
     </refsection>
index 7e3b238..6e5fc66 100644 (file)
@@ -90,7 +90,7 @@ xgrid(3)
         <title>See Also</title>
         <simplelist type="inline">
             <member>
-                <link linkend="percentasn">%asn</link>
+                <link linkend="delip">delip</link>
             </member>
             <member>
                 <link linkend="percentk">%k</link>
index 9b92a0c..5dda0c1 100644 (file)
@@ -52,9 +52,6 @@
             <member>
                 <link linkend="percentsn">%sn</link>
             </member>
-            <member>
-                <link linkend="percentasn">%asn</link>
-            </member>
         </simplelist>
     </refsection>
 </refentry>
index b9a7616..d573d8c 100644 (file)
@@ -127,9 +127,6 @@ intg(0,1,f)    // OK puisque la solution est réelle !
                 <link linkend="amell">amell</link>
             </member>
             <member>
-                <link linkend="percentasn">%asn</link>
-            </member>
-            <member>
                 <link linkend="percentsn">%sn</link>
             </member>
         </simplelist>
index 2c76ef4..a04d962 100644 (file)
@@ -61,9 +61,6 @@
             <member>
                 <link linkend="percentsn">%sn</link>
             </member>
-            <member>
-                <link linkend="percentasn">%asn</link>
-            </member>
         </simplelist>
     </refsection>
 </refentry>
index d280daf..ddecaa2 100644 (file)
@@ -140,7 +140,7 @@ intg(0,1,f)    //OK since real solution!
                 <link linkend="amell">amell</link>
             </member>
             <member>
-                <link linkend="percentasn">%asn</link>
+                <link linkend="delip">delip</link>
             </member>
             <member>
                 <link linkend="percentsn">%sn</link>
index b63a9d1..3e6513f 100644 (file)
@@ -46,7 +46,7 @@
         <title>例</title>
         <programlisting role="example"><![CDATA[ 
 m=0.4;
-%asn(1,m)
+delip(1,sqrt(m))
 %k(m)
  ]]></programlisting>
     </refsection>
@@ -54,7 +54,7 @@ m=0.4;
         <title>参照</title>
         <simplelist type="inline">
             <member>
-                <link linkend="percentasn">%asn</link>
+                <link linkend="delip">delip</link>
             </member>
         </simplelist>
     </refsection>
index 4f6cd82..d5f454a 100644 (file)
@@ -70,7 +70,7 @@ xgrid(3)
         <title>参照</title>
         <simplelist type="inline">
             <member>
-                <link linkend="percentasn">%asn</link>
+                <link linkend="delip">delip</link>
             </member>
             <member>
                 <link linkend="percentk">%k</link>
index 96eaa26..0a63ccc 100644 (file)
@@ -61,9 +61,6 @@
             <member>
                 <link linkend="percentsn">%sn</link>
             </member>
-            <member>
-                <link linkend="percentasn">%asn</link>
-            </member>
         </simplelist>
     </refsection>
 </refentry>
index bb8db93..f32677a 100644 (file)
@@ -136,9 +136,6 @@ intg(0,1,f)    //OK, desde que a solução seja real!
                 <link linkend="amell">amell</link>
             </member>
             <member>
-                <link linkend="percentasn">%asn</link>
-            </member>
-            <member>
                 <link linkend="percentsn">%sn</link>
             </member>
         </simplelist>
index 94a38c1..b63795f 100644 (file)
@@ -60,9 +60,6 @@
             <member>
                 <link linkend="percentsn">%sn</link>
             </member>
-            <member>
-                <link linkend="percentasn">%asn</link>
-            </member>
         </simplelist>
     </refsection>
 </refentry>
index fbf5b5d..7aecaf1 100644 (file)
@@ -139,9 +139,6 @@ intg(0,1,f)    //OK так как решение вещественное!
                 <link linkend="amell">amell</link>
             </member>
             <member>
-                <link linkend="percentasn">%asn</link>
-            </member>
-            <member>
                 <link linkend="percentsn">%sn</link>
             </member>
         </simplelist>