This is the mail archive of the gsl-discuss@sourceware.org mailing list for the GSL project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Fix for complex tan function if the argument has a large negativeimaginary part


Hi,

I've noticed that the complex tan and cot functions return NaN if the
argument z=x+i*y has a large negative imaginary part y, such as
y=-1e7. However, the functions should either return -i or i in that
case.

I noticed that the corresponding hyperbolic functions do not have this
problem, so I propose to fix this bug by using
tan(z)=-i*tanh(i*z)
and using the same algorithm for the calculation of the complex tan
and tanh functions, see attached patch.

I would also like to add unit tests for that (and also for the complex
tan and cot functions for arguments with large positive imaginary
part, and also for the complex tanh and coth functions for large real
parts). I tried to understand how the Lisp file complex/test.el works
and modified it (see the patch). However, it seems that emacs refuses
to evaluate the functions for the arguments I've added, it leaves
lines like

  {FN (tan), ARG(-3.45266983001243932001e-04,8.3886080e+06),
RES(tan(-3.452669830012439320e-4, 8.388608e6), 60)},

which are then removed by the 'clean' function in test.el and never
get written to results.h.

Therefore, I've temporarily added the expected results as hardcoded
values to results.h. I would appreciate any comments on how to improve
this from people who know Lisp better then me.

Best regards,
Frank
=== modified file 'complex/math.c'
--- complex/math.c	2010-05-07 11:53:23 +0000
+++ complex/math.c	2012-02-23 09:40:14 +0000
@@ -489,14 +489,10 @@
     }
   else
     {
-      double u = exp (-I);
-      double C = 2 * u / (1 - pow (u, 2.0));
-      double D = 1 + pow (cos (R), 2.0) * pow (C, 2.0);
-
-      double S = pow (C, 2.0);
-      double T = 1.0 / tanh (I);
-
-      GSL_SET_COMPLEX (&z, 0.5 * sin (2 * R) * S / D, T / D);
+      double D = pow (cos (R), 2.0) + pow (sinh (I), 2.0);
+      double F = 1 + pow (cos (R) / sinh (I), 2.0);
+
+      GSL_SET_COMPLEX (&z, 0.5 * sin (2 * R) / D, 1.0 / (tanh (I) * F));
     }
 
   return z;

=== modified file 'complex/test.c'
--- complex/test.c	2010-05-06 20:07:31 +0000
+++ complex/test.c	2012-02-23 09:46:58 +0000
@@ -93,6 +93,199 @@
 struct fz listz[] =
 {
 #include "results.h"
+  /* The following data can in principle be generated by making the following
+   * additions to test.el:
+   *
+   * (setq zcirc_large_imag (append (combine circ inf)))
+   * (setq zicirc_large_real (append (combine inf circ)))
+   *
+   * then later on, in the function test2 (), add
+   *
+   * (loop1 "tan" zcirc_large_imag)
+   * (loop1 "cot" zcirc_large_imag)
+   * (loop1 "tanh" zicirc_large_real)
+   * (loop1 "coth" zicirc_large_real)
+   *
+   * The problem is that emacs refuses to evaluate the tan, cot, tanh,
+   * and coth functions for these values, such that the clean () function
+   * removes them from the output.
+   */
+  {FN (tan), ARG(-3.45266983001243932001e-04,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(-3.45266983001243932001e-04,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(3.45266983001243932001e-04,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(3.45266983001243932001e-04,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(1.57045105981189525579e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(1.57045105981189525579e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(-1.57045105981189525579e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(-1.57045105981189525579e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(1.57114159377789786021e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(1.57114159377789786021e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(-1.57114159377789786021e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(-1.57114159377789786021e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(3.14124738660679181379e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(3.14124738660679181379e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(-3.14124738660679181379e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(-3.14124738660679181379e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(3.14193792057279441821e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(3.14193792057279441821e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(-3.14193792057279441821e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(-3.14193792057279441821e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(4.71204371340168837179e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(4.71204371340168837179e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(-4.71204371340168837179e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(-4.71204371340168837179e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(4.71273424736769097620e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(4.71273424736769097620e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(-4.71273424736769097620e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(-4.71273424736769097620e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(6.28284004019658492979e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(6.28284004019658492979e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(-6.28284004019658492979e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(-6.28284004019658492979e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(6.28353057416258753420e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(6.28353057416258753420e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(-6.28353057416258753420e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(-6.28353057416258753420e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(9.42443269378637893396e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(9.42443269378637893396e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(-9.42443269378637893396e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(-9.42443269378637893396e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(9.42512322775237976202e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(9.42512322775237976202e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (tan), ARG(-9.42512322775237976202e+00,8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tan), ARG(-9.42512322775237976202e+00,-8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(-3.45266983001243932001e-04,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(-3.45266983001243932001e-04,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(3.45266983001243932001e-04,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(3.45266983001243932001e-04,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(1.57045105981189525579e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(1.57045105981189525579e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(-1.57045105981189525579e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(-1.57045105981189525579e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(1.57114159377789786021e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(1.57114159377789786021e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(-1.57114159377789786021e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(-1.57114159377789786021e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(3.14124738660679181379e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(3.14124738660679181379e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(-3.14124738660679181379e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(-3.14124738660679181379e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(3.14193792057279441821e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(3.14193792057279441821e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(-3.14193792057279441821e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(-3.14193792057279441821e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(4.71204371340168837179e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(4.71204371340168837179e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(-4.71204371340168837179e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(-4.71204371340168837179e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(4.71273424736769097620e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(4.71273424736769097620e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(-4.71273424736769097620e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(-4.71273424736769097620e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(6.28284004019658492979e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(6.28284004019658492979e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(-6.28284004019658492979e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(-6.28284004019658492979e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(6.28353057416258753420e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(6.28353057416258753420e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(-6.28353057416258753420e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(-6.28353057416258753420e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(9.42443269378637893396e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(9.42443269378637893396e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(-9.42443269378637893396e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(-9.42443269378637893396e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(9.42512322775237976202e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(9.42512322775237976202e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (cot), ARG(-9.42512322775237976202e+00,8.3886080e+06), RES(0.0, -1.0)},
+  {FN (cot), ARG(-9.42512322775237976202e+00,-8.3886080e+06), RES(0.0, 1.0)},
+  {FN (tanh), ARG(8.3886080e+06,-3.45266983001243932001e-04), RES(1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,3.45266983001243932001e-04), RES(1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,-3.45266983001243932001e-04), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,3.45266983001243932001e-04), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,1.57045105981189525579e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,-1.57045105981189525579e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,1.57045105981189525579e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,-1.57045105981189525579e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,1.57114159377789786021e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,-1.57114159377789786021e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,1.57114159377789786021e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,-1.57114159377789786021e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,3.14124738660679181379e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,-3.14124738660679181379e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,3.14124738660679181379e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,-3.14124738660679181379e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,3.14193792057279441821e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,-3.14193792057279441821e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,3.14193792057279441821e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,-3.14193792057279441821e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,4.71204371340168837179e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,-4.71204371340168837179e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,4.71204371340168837179e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,-4.71204371340168837179e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,4.71273424736769097620e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,-4.71273424736769097620e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,4.71273424736769097620e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,-4.71273424736769097620e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,6.28284004019658492979e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,-6.28284004019658492979e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,6.28284004019658492979e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,-6.28284004019658492979e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,6.28353057416258753420e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,-6.28353057416258753420e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,6.28353057416258753420e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,-6.28353057416258753420e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,9.42443269378637893396e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,-9.42443269378637893396e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,9.42443269378637893396e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,-9.42443269378637893396e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,9.42512322775237976202e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(8.3886080e+06,-9.42512322775237976202e+00), RES(1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,9.42512322775237976202e+00), RES(-1.0, 0.0)},
+  {FN (tanh), ARG(-8.3886080e+06,-9.42512322775237976202e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,-3.45266983001243932001e-04), RES(1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,3.45266983001243932001e-04), RES(1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,-3.45266983001243932001e-04), RES(-1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,3.45266983001243932001e-04), RES(-1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,1.57045105981189525579e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,-1.57045105981189525579e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,1.57045105981189525579e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,-1.57045105981189525579e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,1.57114159377789786021e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,-1.57114159377789786021e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,1.57114159377789786021e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,-1.57114159377789786021e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,3.14124738660679181379e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,-3.14124738660679181379e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,3.14124738660679181379e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,-3.14124738660679181379e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,3.14193792057279441821e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,-3.14193792057279441821e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,3.14193792057279441821e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,-3.14193792057279441821e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,4.71204371340168837179e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,-4.71204371340168837179e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,4.71204371340168837179e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,-4.71204371340168837179e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,4.71273424736769097620e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,-4.71273424736769097620e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,4.71273424736769097620e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,-4.71273424736769097620e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,6.28284004019658492979e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,-6.28284004019658492979e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,6.28284004019658492979e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,-6.28284004019658492979e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,6.28353057416258753420e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,-6.28353057416258753420e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,6.28353057416258753420e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,-6.28353057416258753420e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,9.42443269378637893396e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,-9.42443269378637893396e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,9.42443269378637893396e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,-9.42443269378637893396e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,9.42512322775237976202e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(8.3886080e+06,-9.42512322775237976202e+00), RES(1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,9.42512322775237976202e+00), RES(-1.0, 0.0)},
+  {FN (coth), ARG(-8.3886080e+06,-9.42512322775237976202e+00), RES(-1.0, 0.0)},
   {"", 0, 0, 0, 0, 0}
 };
 

=== modified file 'complex/test.el'
--- complex/test.el	2010-05-06 20:07:31 +0000
+++ complex/test.el	2012-02-23 09:44:04 +0000
@@ -244,6 +244,8 @@
 
 (setq zcirc (append (combine circ zfinite)))
 (setq zicirc (append (combine zfinite circ)))
+(setq zcirc_large_imag (append (combine circ inf)))
+(setq zicirc_large_real (append (combine inf circ)))
 
 (defun test1 ()
   (loop1 "arg" z0)
@@ -262,6 +264,7 @@
   (loop1 "sin" zcirc)
   (loop1 "cos" zcirc)
   (loop1 "tan" zcirc)
+  (loop1 "tan" zcirc_large_imag)
 
   (loop1 "arcsin" z0)
   (loop1 "arccos" z0)
@@ -270,6 +273,7 @@
   (loop1 "sinh" zicirc)
   (loop1 "cosh" zicirc)
   (loop1 "tanh" zicirc)
+  (loop1 "tanh" zicirc_large_real)
 
   (loop1 "arcsinh" z0)
   (loop1 "arccosh" z0)
@@ -278,6 +282,7 @@
   (loop1 "csc" zcirc)
   (loop1 "sec" zcirc)
   (loop1 "cot" zcirc)
+  (loop1 "cot" zcirc_large_imag)
 
   (loop1 "arccsc" z0)
   (loop1 "arcsec" z0)
@@ -286,6 +291,7 @@
   (loop1 "csch" zicirc)
   (loop1 "sech" zicirc)
   (loop1 "coth" zicirc)
+  (loop1 "coth" zicirc_large_real)
 
   (loop1 "arccsch" z0)
   (loop1 "arcsech" z0)


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]