Parent Directory | Revision Log | Patch
revision 1.19 by camm, Sun Sep 14 02:43:07 2003 UTC | revision 1.20 by camm, Fri Oct 10 02:39:17 2003 UTC | |
---|---|---|
# | Line 113 ifloor(int x, int y) | Line 113 ifloor(int x, int y) |
113 | if (x >= 0) | if (x >= 0) |
114 | return(x/y); | return(x/y); |
115 | else | else |
116 | return(-((-x+y-1))/y); | /* FIXME, deal with possible overflow here*/ |
117 | return(-((-x-1))/y-1); | |
118 | } | } |
119 | if (x >= 0) | if (x >= 0) |
120 | return(-((x-y-1)/(-y))); | /* FIXME, deal with possible overflow here*/ |
121 | return(-((x-1)/(-y))-1); | |
122 | else | else |
123 | return((-x)/(-y)); | return((-x)/(-y)); |
124 | } | } |
|
savannah-hackers-public@gnu.org | ViewVC Help |
Powered by ViewVC 1.1.26 |