1: /* @(#)floor.c 4.1 12/25/82 */
2:
3: /*
4: * floor and ceil-- greatest integer <= arg
5: * (resp least >=)
6: */
7:
8: double modf();
9:
10: double
11: floor(d)
12: double d;
13: {
14: double fract;
15:
16: if (d<0.0) {
17: d = -d;
18: fract = modf(d, &d);
19: if (fract != 0.0)
20: d += 1;
21: d = -d;
22: } else
23: modf(d, &d);
24: return(d);
25: }
26:
27: double
28: ceil(d)
29: double d;
30: {
31: return(-floor(-d));
32: }
Defined functions
ceil
defined in line
27; used 6 times
floor
defined in line
10; used 81 times
- in line 31
- in /usr/include/math.h line
6
- in /usr/src/include/math.h line
6
- in /usr/src/new/B/src/bint/b1fun.c line
465
- in /usr/src/new/B/src/bint/b1nuA.c line
142,
204-206(2),
240,
250
- in /usr/src/new/B/src/bint/b1nuI.c line
106,
244,
252
- in /usr/src/new/B/src/bint/b1nuQ.c line
28,
54,
139,
154
- in /usr/src/new/B/src/bint/b1num.c line
287,
301
- in /usr/src/new/B/src/bsmall/B1fun.c line
63,
86,
134,
142,
161,
174,
184
- in /usr/src/new/B/src/bsmall/B1num.c line
61(2),
68-73(2),
164
- in /usr/src/new/B/src/bsmall/b2fil.c line
122(2)
- in /usr/src/new/apl/src/a0.c line
346
- in /usr/src/new/apl/src/ae.c line
68
- in /usr/src/new/apl/src/af.c line
58
- in /usr/src/new/apl/src/ao.c line
56,
97,
434
- in /usr/src/new/apl/src/apl.h line
444
- in /usr/src/new/dipress/src/bin/dipress/ipress.c line
133,
552
- in /usr/src/ucb/lisp/franz/lam5.c line
389,
400
- in /usr/src/usr.bin/graph/graph.c line
319
- in /usr/src/usr.bin/plot/crtplot.c line
184,
204(2)
- in /usr/src/usr.lib/libF77/d_int.c line
12-14(3)
- in /usr/src/usr.lib/libF77/d_mod.c line
12-16(3)
- in /usr/src/usr.lib/libF77/d_nint.c line
12-15(3)
- in /usr/src/usr.lib/libF77/h_dnnt.c line
12-15(3)
- in /usr/src/usr.lib/libF77/h_nint.c line
12-15(3)
- in /usr/src/usr.lib/libF77/i_dnnt.c line
12-15(3)
- in /usr/src/usr.lib/libF77/i_nint.c line
12-15(3)
- in /usr/src/usr.lib/libF77/r_int.c line
12-14(3)
- in /usr/src/usr.lib/libF77/r_mod.c line
14-18(3)
- in /usr/src/usr.lib/libF77/r_nint.c line
14-16(3)
- in /usr/src/usr.lib/libom/exp.c line
41
- in /usr/src/usr.lib/libplot/dumb/subr.c line
22,
43-44(2)