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 8 times
floor
defined in line
10; used 141 times
- in line 31
- in /usr/include/math.h line
9
- in /usr/src/games/phantasia/fight.c line
146,
170-171(2),
247,
368,
495,
552
- in /usr/src/games/phantasia/func0.c line
53-58(2),
273-274(2),
344,
644-645(2),
658,
664-672(3),
680-688(3),
694,
704-708(2),
716-724(3),
730-738(3),
746-750(2),
777-778(2),
804-805(2),
936,
1001
- in /usr/src/games/phantasia/func2.c line
41-42(2),
55,
63,
101,
159-160(2),
267,
392-393(2),
418-419(2),
647
- in /usr/src/games/phantasia/main.c line
197-198(2),
308
- in /usr/src/games/phantasia/phant.h line
24-32(3)
- in /usr/src/include/math.h line
9
- in /usr/src/new/OLD/apl/src/a0.c line
346
- in /usr/src/new/OLD/apl/src/ae.c line
68
- in /usr/src/new/OLD/apl/src/af.c line
58
- in /usr/src/new/OLD/apl/src/ao.c line
56,
97,
434
- in /usr/src/new/OLD/apl/src/apl.h line
444
- in /usr/src/new/PORT/B/src/bint/b1fun.c line
465
- in /usr/src/new/PORT/B/src/bint/b1nuA.c line
142,
204-206(2),
240,
250
- in /usr/src/new/PORT/B/src/bint/b1nuI.c line
106,
244,
252
- in /usr/src/new/PORT/B/src/bint/b1nuQ.c line
28,
54,
139,
154
- in /usr/src/new/PORT/B/src/bint/b1num.c line
287,
301
- in /usr/src/new/PORT/B/src/bsmall/B1fun.c line
63,
86,
134,
142,
161,
174,
184
- in /usr/src/new/PORT/B/src/bsmall/B1num.c line
61(2),
68-73(2),
164
- in /usr/src/new/PORT/B/src/bsmall/b2fil.c line
122(2)
- in /usr/src/new/PORT/apl/src/a0.c line
346
- in /usr/src/new/PORT/apl/src/ae.c line
68
- in /usr/src/new/PORT/apl/src/af.c line
58
- in /usr/src/new/PORT/apl/src/ao.c line
56,
97,
434
- in /usr/src/new/PORT/apl/src/apl.h line
444
- 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)