~ubuntu-branches/ubuntu/natty/bc/natty

« back to all changes in this revision

Viewing changes to Test/BUG.bc

  • Committer: Bazaar Package Importer
  • Author(s): Dirk Eddelbuettel
  • Date: 2002-04-13 11:33:49 UTC
  • Revision ID: james.westby@ubuntu.com-20020413113349-hl2r1t730b91ov68
Tags: upstream-1.06
ImportĀ upstreamĀ versionĀ 1.06

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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   */