1*cac8e449Smatt.\" $NetBSD: qdiv.3,v 1.9 2008/08/04 21:29:27 matt Exp $ 26dda330eSthorpej.\" 3bfd7fc20Sjtc.\" Copyright (c) 1990, 1991 The Regents of the University of California. 4bfd7fc20Sjtc.\" All rights reserved. 5bfd7fc20Sjtc.\" 6bfd7fc20Sjtc.\" This code is derived from software contributed to Berkeley by 7bfd7fc20Sjtc.\" Chris Torek and the American National Standards Committee X3, 8bfd7fc20Sjtc.\" on Information Processing Systems. 9bfd7fc20Sjtc.\" 10bfd7fc20Sjtc.\" Redistribution and use in source and binary forms, with or without 11bfd7fc20Sjtc.\" modification, are permitted provided that the following conditions 12bfd7fc20Sjtc.\" are met: 13bfd7fc20Sjtc.\" 1. Redistributions of source code must retain the above copyright 14bfd7fc20Sjtc.\" notice, this list of conditions and the following disclaimer. 15bfd7fc20Sjtc.\" 2. Redistributions in binary form must reproduce the above copyright 16bfd7fc20Sjtc.\" notice, this list of conditions and the following disclaimer in the 17bfd7fc20Sjtc.\" documentation and/or other materials provided with the distribution. 18eb7c1594Sagc.\" 3. Neither the name of the University nor the names of its contributors 19bfd7fc20Sjtc.\" may be used to endorse or promote products derived from this software 20bfd7fc20Sjtc.\" without specific prior written permission. 21bfd7fc20Sjtc.\" 22bfd7fc20Sjtc.\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 23bfd7fc20Sjtc.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 24bfd7fc20Sjtc.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 25bfd7fc20Sjtc.\" ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 26bfd7fc20Sjtc.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 27bfd7fc20Sjtc.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 28bfd7fc20Sjtc.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 29bfd7fc20Sjtc.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 30bfd7fc20Sjtc.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 31bfd7fc20Sjtc.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 32bfd7fc20Sjtc.\" SUCH DAMAGE. 33bfd7fc20Sjtc.\" 34bfd7fc20Sjtc.\" from: @(#)qdiv.3 5.3 (Berkeley) 6/29/91 35bfd7fc20Sjtc.\" 36bfd7fc20Sjtc.Dd June 29, 1991 37918d73c5Sjtc.Dt QDIV 3 38bfd7fc20Sjtc.Os 39bfd7fc20Sjtc.Sh NAME 40bfd7fc20Sjtc.Nm qdiv 41bfd7fc20Sjtc.Nd return quotient and remainder from division 42312aca53Sperry.Sh LIBRARY 43312aca53Sperry.Lb libc 44bfd7fc20Sjtc.Sh SYNOPSIS 45472351e1Swiz.In stdlib.h 46bfd7fc20Sjtc.Ft qdiv_t 47bfd7fc20Sjtc.Fn qdiv "quad_t num" "quad_t denom" 48bfd7fc20Sjtc.Sh DESCRIPTION 49bfd7fc20SjtcThe 50bfd7fc20Sjtc.Fn qdiv 51bfd7fc20Sjtcfunction 52bfd7fc20Sjtccomputes the value 53bfd7fc20Sjtc.Ar num/denom 54bfd7fc20Sjtcand returns the quotient and remainder in a structure named 55bfd7fc20Sjtc.Ar qdiv_t 56bfd7fc20Sjtcthat contains two 57bfd7fc20Sjtc.Em quad integer 58bfd7fc20Sjtcmembers named 59bfd7fc20Sjtc.Ar quot 60bfd7fc20Sjtcand 61bfd7fc20Sjtc.Ar rem . 62bfd7fc20Sjtc.Sh SEE ALSO 63bfd7fc20Sjtc.Xr div 3 , 64*cac8e449Smatt.Xr imaxdiv 3 , 65bfd7fc20Sjtc.Xr ldiv 3 , 66e4d7c2e3Skleink.Xr lldiv 3 , 67bfd7fc20Sjtc.Xr math 3 68