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

Diff of /gcl/o/num_arith.c

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

revision 1.16 by camm, Sat Nov 27 22:19:35 2004 UTC revision 1.17 by camm, Fri Jun 10 15:35:40 2005 UTC
# Line 62  object fixnum_sub(fixnum i, fixnum j) Line 62  object fixnum_sub(fixnum i, fixnum j)
62     }     }
63  }  }
64    
65    object
66    fixnum_times(fixnum i, fixnum j) {
67    
68      if (i>=0) {
69        if (j>=0) {
70          if (!i || j<= (MOST_POSITIVE_FIX/i))
71            goto FIX;
72        } else {
73          if (j==-1 || i<= (MOST_NEGATIVE_FIX/j))
74            goto FIX;
75        }
76      } else {
77        if (j>=0) {
78          if (i==-1 || j<= (MOST_NEGATIVE_FIX/i))
79            goto FIX;
80        } else {
81          if (-i<= (MOST_POSITIVE_FIX/-j))
82            goto FIX;
83        }
84      }
85      MPOP(return,mulss,i,j);
86     FIX:
87      return make_fixnum(i*j);
88    }
89    
90    /* return i - j */
91  /* static object */  /* static object */
92  /* fixnum_times(int i, int j) */  /* fixnum_times(int i, int j) */
93  /* { */  /* { */
# Line 589  number_times(object x, object y) Line 615  number_times(object x, object y)
615          case t_fixnum:          case t_fixnum:
616                  switch (type_of(y)) {                  switch (type_of(y)) {
617                  case t_fixnum:                  case t_fixnum:
618                    MPOP(return,mulss,fix(x),fix(y));                    return fixnum_times(fix(x),fix(y));
619    /*                MPOP(return,mulss,fix(x),fix(y)); */
620                  case t_bignum:                  case t_bignum:
621                    MPOP(return,mulsi,fix(x),MP(y));                    MPOP(return,mulsi,fix(x),MP(y));
622                  case t_ratio:                  case t_ratio:

Legend:
Removed from v.1.16  
changed lines
  Added in v.1.17

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