# 2.11BSD#431 - /usr/src/new/PORT/B/src/bsmall/B1num.h

##### Macros

    Approxval         X
    Checknum          X
    Denominator       X
    Exact             X
    Integral          X
    Numerator         X
    Numval            X
    One               X
    Two               X
    Zero              X

##### typedef's

    integer           X

       1: /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1984. */
       2: /* $Header: B1num.h,v 1.1 84/06/28 00:48:38 timo Exp $ */
       3:
       4: /* Definitions for number internals */
       5:
       6: typedef struct{double p, q;} number;
       7: typedef double integer;
       8: #define Zero ((integer) 0)
       9: #define One ((integer) 1)
      10: #define Two ((integer) 2)
      11:
      12: #define Checknum(v) if ((v)->type != Num) error("value not a number")
      13: #define Numerator(v) ((integer) ((number *)Ats(v))->p)
      14: #define Denominator(v) ((integer) ((number *)Ats(v))->q)
      15: #define Exact(v) (((number *)Ats(v))->q != Zero)
      16: #define Integral(v) (Exact(v) && (Denominator(v)==One))
      17: #define Approxval(v) (((number *)Ats(v))->p)
      18: #define Numval(v) (Exact(v) ? Numerator(v)/Denominator(v) : Approxval(v))
      19:
      20: value mk_int();
      21: value mk_approx();
      22: value mk_exact();

#### Defined typedef's

integer defined in line 7; used 21 times

- in line 8-14(5)
- in /usr/src/new/PORT/B/src/bsmall/B1fun.c line 67-69(2), 125
- in /usr/src/new/PORT/B/src/bsmall/B1num.c line 58-59(3), 79-80(2), 103-106(2)
- in /usr/src/new/PORT/B/src/bsmall/B1val.c line 74-77(2), 166-173(4)

#### Defined macros

Approxval defined in line 17; used 3 times

- in line 18
- in /usr/src/new/PORT/B/src/bsmall/B1fun.c line 103
- in /usr/src/new/PORT/B/src/bsmall/B1num.c line 112

Checknum defined in line 12; used 18 times

- in /usr/src/new/PORT/B/src/bsmall/B1fun.c line 15(2), 25, 38, 46(2), 65(2), 115, 123, 147, 160(2)
- in /usr/src/new/PORT/B/src/bsmall/B1num.c line 20, 26, 32-37(2), 152

Denominator defined in line 14; used 36 times

- in line 16-18(2)
- in /usr/src/new/PORT/B/src/bsmall/B1fun.c line 17-19(5), 27, 41, 48-50(4), 67, 73-76(2), 125
- in /usr/src/new/PORT/B/src/bsmall/B1num.c line 28, 38, 88, 94, 112, 118-122(3), 129, 155-163(3), 182, 236
- in /usr/src/new/PORT/B/src/bsmall/B1val.c line 161(2), 172-173(2), 230

Exact defined in line 15; used 21 times

- in line 16-18(2)
- in /usr/src/new/PORT/B/src/bsmall/B1fun.c line 16(2), 26, 40, 47(2), 66-68(2), 124
- in /usr/src/new/PORT/B/src/bsmall/B1num.c line 21, 27, 128, 136-138(4), 154, 236-237(2)

Integral defined in line 16; used 4 times

- in /usr/src/new/PORT/B/src/bsmall/B1fun.c line 68, 148
- in /usr/src/new/PORT/B/src/bsmall/B1num.c line 99
- in /usr/src/new/PORT/B/src/bsmall/B1val.c line 163

Numerator defined in line 13; used 33 times

- in line 18
- in /usr/src/new/PORT/B/src/bsmall/B1fun.c line 18(3), 27, 41, 48-50(4), 67-77(3), 125, 153(3)
- in /usr/src/new/PORT/B/src/bsmall/B1num.c line 22, 43(2), 49, 88, 94, 118-122(3), 129, 155
- in /usr/src/new/PORT/B/src/bsmall/B1val.c line 160(2), 170-171(2), 229

Numval defined in line 18; used 17 times

- in /usr/src/new/PORT/B/src/bsmall/B1fun.c line 16(2), 26, 39-40(2), 47(2), 92, 103, 116, 124, 161(2)
- in /usr/src/new/PORT/B/src/bsmall/B1num.c line 33, 133(2), 153

One defined in line 9; used 25 times

- in line 16
- in /usr/src/new/PORT/B/src/bsmall/B1fun.c line 70, 79, 130(2)
- in /usr/src/new/PORT/B/src/bsmall/B1num.c line 38, 67, 81-87(4), 93(4), 103-107(2), 118-122(5), 158, 182, 236

Two defined in line 10; used 4 times

- in /usr/src/new/PORT/B/src/bsmall/B1fun.c line 63(2), 81-86(2)

Zero defined in line 8; used 15 times

- in line 15
- in /usr/src/new/PORT/B/src/bsmall/B1fun.c line 70-71(2), 96, 130
- in /usr/src/new/PORT/B/src/bsmall/B1num.c line 60-63(4), 71, 82, 91-92(2), 112, 118

#### Usage of this include

B1num.h used 3 times

- in /usr/src/new/PORT/B/src/bsmall/B1fun.c line 8
- in /usr/src/new/PORT/B/src/bsmall/B1num.c line 17
- in /usr/src/new/PORT/B/src/bsmall/B1val.c line 15

Last modified: 1985-08-27 Generated: 2016-12-26 | Generated by src2html V0.67 page hit count: 523 |