/[gcl]/gcl/o/num_sfun.c
ViewVC logotype

Diff of /gcl/o/num_sfun.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.5 by camm, Mon Jan 13 02:38:02 2003 UTC revision 1.6 by camm, Sat Feb 15 00:38:28 2003 UTC
# Line 31  fixnum_expt(int x, int y) Line 31  fixnum_expt(int x, int y)
31  {  {
32          int z;          int z;
33    
34          z = 1;          z = 1;
35          while (y > 0)          while (y > 0)
36                  if (y%2 == 0) {                  if (y%2 == 0) {
37                          x *= x;                          x *= x;
# Line 43  fixnum_expt(int x, int y) Line 43  fixnum_expt(int x, int y)
43          return(z);          return(z);
44  }  }
45    
46  object  static object
47  number_exp(object x)  number_exp(object x)
48  {  {
49          double exp(double);          double exp(double);
# Line 64  number_exp(object x) Line 64  number_exp(object x)
64          case t_complex:          case t_complex:
65          {          {
66                  object y, y1;                  object y, y1;
67                  object number_sin(object x), number_cos(object x);                  static object number_sin(object x), number_cos(object x);
68                  vs_mark;                  vs_mark;
69                    
70                  y = x->cmp.cmp_imag;                  y = x->cmp.cmp_imag;
# Line 92  object Line 92  object
92  number_expt(object x, object y)  number_expt(object x, object y)
93  {  {
94          enum type tx, ty;          enum type tx, ty;
95          object z, number_nlog(object x);          object z;
96            static object number_nlog(object x);
97          vs_mark;          vs_mark;
98    
99          tx = type_of(x);          tx = type_of(x);
# Line 171  number_expt(object x, object y) Line 172  number_expt(object x, object y)
172          return(z);          return(z);
173  }  }
174    
175  object  static object
176  number_nlog(object x)  number_nlog(object x)
177  {  {
178          double log(double);          double log(double);
179          object r=Cnil, i=Cnil, a, p, number_sqrt(object x), number_atan2(object y, object x);          object r=Cnil, i=Cnil, a, p;
180            static object number_sqrt(object x), number_atan2(object y, object x);
181          vs_mark;          vs_mark;
182    
183          if (type_of(x) == t_complex) {          if (type_of(x) == t_complex) {
# Line 224  COMPLEX: Line 226  COMPLEX:
226          return(x);          return(x);
227  }  }
228    
229  object  static object
230  number_log(object x, object y)  number_log(object x, object y)
231  {  {
232          object z;          object z;
# Line 243  number_log(object x, object y) Line 245  number_log(object x, object y)
245          return(z);          return(z);
246  }  }
247    
248  object  static object
249  number_sqrt(object x)  number_sqrt(object x)
250  {  {
251          object z;          object z;
# Line 279  COMPLEX: Line 281  COMPLEX:
281          return(z);          return(z);
282  }  }
283    
284  object  static object
285  number_atan2(object y, object x)  number_atan2(object y, object x)
286  {  {
287          object z;          object z;
# Line 315  number_atan2(object y, object x) Line 317  number_atan2(object y, object x)
317          return(z);          return(z);
318  }  }
319    
320  object  static object
321  number_atan(object y)  number_atan(object y)
322  {  {
323          object z, z1;          object z, z1;
# Line 343  number_atan(object y) Line 345  number_atan(object y)
345          return(number_atan2(y, small_fixnum(1)));          return(number_atan2(y, small_fixnum(1)));
346  }  }
347    
348  object  static object
349  number_sin(object x)  number_sin(object x)
350  {  {
351          double sin(double);          double sin(double);
# Line 390  number_sin(object x) Line 392  number_sin(object x)
392          }          }
393  }  }
394    
395  object  static object
396  number_cos(object x)  number_cos(object x)
397  {  {
398          double cos(double);          double cos(double);
# Line 484  number_tan1(object x) Line 486  number_tan1(object x)
486          }          }
487  }  }
488    
489  object  static object
490  number_tan(object x)  number_tan(object x)
491  {  {
492          object r, c;          object r, c;
# Line 589  Latan(void) Line 591  Latan(void)
591                  too_many_arguments();                  too_many_arguments();
592  }  }
593    
594  void  static void
595  siLmodf(void)  siLmodf(void)
596  {  {
597        

Legend:
Removed from v.1.5  
changed lines
  Added in v.1.6

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26