[gforth] / gforth / prim  

gforth: gforth/prim

Diff for /gforth/prim between version 1.198 and 1.199

version 1.198, Sun Oct 22 16:54:00 2006 UTC version 1.199, Sun Oct 22 20:45:34 2006 UTC
Line 844 
Line 844 
   
 */mod   ( n1 n2 n3 -- n4 n5 )   core    star_slash_mod  */mod   ( n1 n2 n3 -- n4 n5 )   core    star_slash_mod
 ""n1*n2=n3*n5+n4, with the intermediate result (n1*n2) being double.""  ""n1*n2=n3*n5+n4, with the intermediate result (n1*n2) being double.""
 DCell d5;  
 #ifdef BUGGY_LL_MUL  #ifdef BUGGY_LL_MUL
 DCell d = mmul(n1,n2);  DCell d = mmul(n1,n2);
 #else  #else
Line 856 
Line 855 
 n5=DLO(r);  n5=DLO(r);
 #else  #else
 /* assumes that the processor uses either floored or symmetric division */  /* assumes that the processor uses either floored or symmetric division */
 d5 = d/n3;  DCell d5 = d/n3;
 n4 = d%n3;  n4 = d%n3;
 if (CHECK_DIVISION && n3 == 0)  if (CHECK_DIVISION && n3 == 0)
   throw(BALL_DIVZERO);    throw(BALL_DIVZERO);
Line 873 
Line 872 
   
 */      ( n1 n2 n3 -- n4 )      core    star_slash  */      ( n1 n2 n3 -- n4 )      core    star_slash
 ""n4=(n1*n2)/n3, with the intermediate result being double.""  ""n4=(n1*n2)/n3, with the intermediate result being double.""
 DCell d4;  
 #ifdef BUGGY_LL_MUL  #ifdef BUGGY_LL_MUL
 DCell d = mmul(n1,n2);  DCell d = mmul(n1,n2);
 #else  #else
Line 884 
Line 882 
 n4=DLO(r);  n4=DLO(r);
 #else  #else
 /* assumes that the processor uses either floored or symmetric division */  /* assumes that the processor uses either floored or symmetric division */
 d4 = d/n3;  DCell d4 = d/n3;
 if (CHECK_DIVISION && n3 == 0)  if (CHECK_DIVISION && n3 == 0)
   throw(BALL_DIVZERO);    throw(BALL_DIVZERO);
 if (FLOORED_DIV && ((DHI(d)^n3)<0) && (d%n3)!=0)  if (FLOORED_DIV && ((DHI(d)^n3)<0) && (d%n3)!=0)


Generate output suitable for use with a patch program
Legend:
Removed from v.1.198  
changed lines
  Added in v.1.199

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help