"Fossies" - the Fresh Open Source Software Archive

Member "bc-1.06.95/Test/BUG.bc" (7 Jul 2000, 889 Bytes) of package /linux/misc/old/bc-1.06.95.tar.gz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file.

    1 /* <--- bug.bc ---><--- bug.bc ---><--- bug.bc ---><--- bug.bc ---> */
    2 
    3 /*
    4  *  See the file "signum" for a description and reference for this
    5  *  program.  
    6  *
    7  *  THIS BUG IS *NOT* IN GNU BC!!!
    8  *
    9  */
   10 
   11 obase=16
   12 ibase=16
   13 x=1A8F5C99605AE52	/* dividend			*/
   14 y=BB0B404		/* divisor			*/
   15 q=245A07AD		/* (correct) quotient		*/
   16 r=147EB9E		/* (correct) remainder		*/
   17 "Base 16
   18 "
   19 "x    = "; x		/* output numbers just to be sure... */
   20 "y    = "; y
   21 "quo  = "; q
   22 "rem  = "; r
   23 "x/y  = "; x/y		/* watch this result! */
   24 "x%y  = "; x%y		/* watch this result! */
   25 "y*q+r= "; y*q+r	/* check quotient & remainder	*/
   26 /*
   27  * Do the same thing in base 10:
   28  */
   29 "
   30 Base 10
   31 "
   32 ibase=A
   33 obase=10
   34 "x    = "; x		/* output numbers just to be sure... */
   35 "y    = "; y
   36 "q    = "; q
   37 "r    = "; r
   38 "x/y  = "; x/y		/* watch this result! */
   39 "x%y  = "; x%y		/* watch this result! */
   40 "y*q+r= "; y*q+r	/* check quotient & remainder	*/