.\" -*- coding: UTF-8 -*- '\" t .\" Copyright 1993 David Metcalfe (david@prism.demon.co.uk) .\" .\" SPDX-License-Identifier: Linux-man-pages-copyleft .\" .\" References consulted: .\" Linux libc source code .\" Lewine's _POSIX Programmer's Guide_ (O'Reilly & Associates, 1991) .\" 386BSD man pages .\" .\" Modified 1993-03-29, David Metcalfe .\" Modified 1993-07-24, Rik Faith (faith@cs.unc.edu) .\" Modified 2002-08-10, 2003-11-01 Walter Harms, aeb .\" .\"******************************************************************* .\" .\" This file was generated with po4a. Translate the source file. .\" .\"******************************************************************* .TH div 3 "20 ​​Julio 2023" "Páginas de manual de Linux 6.05.01" .SH NOMBRE div, ldiv, lldiv, imaxdiv \- calcula el cociente y el resto de una división entera .SH BIBLIOTECA Biblioteca Estándar C (\fIlibc\fP, \fI\-lc\fP) .SH SINOPSIS .nf \fB#include \fP .PP \fBdiv_t div(int \fP\fInumerator\fP\fB, int \fP\fIdenominator\fP\fB);\fP \fBldiv_t ldiv(long \fP\fInumerator\fP\fB, long \fP\fIdenominator\fP\fB);\fP \fBlldiv_t lldiv(long long \fP\fInumerator\fP\fB, long long \fP\fIdenominator\fP\fB);\fP .PP \fB#include \fP .PP \fBimaxdiv_t imaxdiv(intmax_t \fP\fInumerator\fP\fB, intmax_t \fP\fIdenominator\fP\fB);\fP .fi .PP .RS -4 Requisitos de Macros de Prueba de Características para glibc (véase \fBfeature_test_macros\fP(7)): .RE .PP \fBlldiv\fP(): .nf _ISOC99_SOURCE || _POSIX_C_SOURCE >= 200112L .fi .SH DESCRIPCIÓN The \fBdiv\fP() function computes the value \fInumerator\fP/\fIdenominator\fP and returns the quotient and remainder in a structure named \fIdiv_t\fP that contains two integer members (in unspecified order) named \fIquot\fP and \fIrem\fP. The quotient is rounded toward zero. The result satisfies \fIquot\fP*\fIdenominator\fP+\fIrem\fP = \fInumerator\fP. .PP The \fBldiv\fP(), \fBlldiv\fP(), and \fBimaxdiv\fP() functions do the same, dividing numbers of the indicated type and returning the result in a structure of the indicated name, in all cases with fields \fIquot\fP and \fIrem\fP of the same type as the function arguments. .SH "VALOR DEVUELTO" The \fIdiv_t\fP (etc.) structure. .SH ATRIBUTOS Para obtener una explicación de los términos usados en esta sección, véase \fBattributes\fP(7). .TS allbox; lbx lb lb l l l. Interfaz Atributo Valor T{ .na .nh \fBdiv\fP(), \fBldiv\fP(), \fBlldiv\fP(), \fBimaxdiv\fP() T} Seguridad del hilo Multi\-hilo seguro .TE .sp 1 .SH ESTÁNDARES C11, POSIX.1\-2008. .SH HISTORIAL POSIX.1\-2001, C89, C99, SVr4, 4.3BSD. .PP \fBlldiv\fP() and \fBimaxdiv\fP() were added in C99. .SH EJEMPLOS After .PP .in +4n .EX div_t q = div(\-5, 3); .EE .in .PP the values \fIq.quot\fP and \fIq.rem\fP are \-1 and \-2, respectively. .SH "VÉASE TAMBIÉN" \fBabs\fP(3), \fBremainder\fP(3) .PP .SH TRADUCCIÓN La traducción al español de esta página del manual fue creada por Sebastian Desimone y Gerardo Aburruzaga García . .PP Esta traducción es documentación libre; lea la .UR https://www.gnu.org/licenses/gpl-3.0.html GNU General Public License Version 3 .UE o posterior con respecto a las condiciones de copyright. No existe NINGUNA RESPONSABILIDAD. .PP Si encuentra algún error en la traducción de esta página del manual, envíe un correo electrónico a .MT debian-l10n-spanish@lists.debian.org .ME .