Download CC-RL Compiler User`s Manual
Transcript
CC-RL
7. LIBRARY FUNCTIONAL SPECIFICATIONS
ldiv
Perform division of long type to obtain the quotient and remainder
[Classification]
Standard library
[Syntax]
#include <stdlib.h>
ldiv_t ldiv(long n, long d);
[Return value]
The structure storing the result of the division is returned. When divided by 0, -1 is set to quotient quot and n is set to
remainder rem.
[Description]
This function is used to divide a value of long type.
This function calculates the quotient (quot) and remainder (rem) resulting from dividing numerator n by denominator d,
and stores these two integers as the members of the following structure div_t.
typedef struct {
long int
long int
} ldiv_t;
quot;
rem;
When the value cannot be divided, the quotient of the result becomes an integer that is closest to the algebraical quotient but has a smaller absolute value.
R20UT3123EJ0102 Rev.1.02
Sep 14, 2015
Page 596 of 780
Related documents
CS+ Integrated Development Environment User`s Manual: CC
RL78,78K0R Coding - Renesas Electronics
CubeSuite+ V2.02.00 User`s Manual: RX Build
Migration guide - FTP Directory Listing
CS+ V3.02.00 Integrated Development Environment User`s Manual
CubeSuite Ver.1.40 Integrated Development Environment User`s
RL78 Data Flash Access Library Type T02 (Tiny), European Release
CC-RX V2.01.00 User`ss Manual: Message
Embedded C Programming II (ECProgramII)
Written Final - CS Course Webpages
RA78K0R Ver. 1.20 Assembler Package Language UM
CubeSuite+ V2.00.00 Integrated Development Environment User`s