div() & ldiv() behavior?

Henry Spencer henry at zoo.toronto.edu
Thu Apr 11 02:33:01 AEST 1991


In article <10989 at ncar.ucar.edu> steve at unidata.ucar.edu (Steve Emmerson) writes:
>I know what this means when both arguments are positive, but I'm uncertain
>what this means for the other three cases.

For the normal division operator, the results are machine-specific.  For
div() and ldiv(), however, the quotient is truncated towards zero.
-- 
And the bean-counter replied,           | Henry Spencer @ U of Toronto Zoology
"beans are more important".             |  henry at zoo.toronto.edu  utzoo!henry



More information about the Comp.std.c mailing list