home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Geek Gadgets 1
/
ADE-1.bin
/
ade-dist
/
bc-1.03-src.tgz
/
tar.out
/
fsf
/
bc
/
Test
/
BUG.bc
< prev
next >
Wrap
Text File
|
1996-09-28
|
889b
|
41 lines
/* <--- bug.bc ---><--- bug.bc ---><--- bug.bc ---><--- bug.bc ---> */
/*
* See the file "signum" for a description and reference for this
* program.
*
* THIS BUG IS *NOT* IN GNU BC!!!
*
*/
obase=16
ibase=16
x=1A8F5C99605AE52 /* dividend */
y=BB0B404 /* divisor */
q=245A07AD /* (correct) quotient */
r=147EB9E /* (correct) remainder */
"Base 16
"
"x = "; x /* output numbers just to be sure... */
"y = "; y
"quo = "; q
"rem = "; r
"x/y = "; x/y /* watch this result! */
"x%y = "; x%y /* watch this result! */
"y*q+r= "; y*q+r /* check quotient & remainder */
/*
* Do the same thing in base 10:
*/
"
Base 10
"
ibase=A
obase=10
"x = "; x /* output numbers just to be sure... */
"y = "; y
"q = "; q
"r = "; r
"x/y = "; x/y /* watch this result! */
"x%y = "; x%y /* watch this result! */
"y*q+r= "; y*q+r /* check quotient & remainder */