Multi-Precision Arithmetic by C++ with no
use of assembler
SN library Copyright (C) 1999-2018 K.Tsuru
Reference of class functions part 4
6. Ldiv_t structure
It defines a structure which has a quotient and a remainder as members, i.e. the
"SLong" version of "div_t"(ANSI C/C++).
[Definition of quotient and remainder in this library]
x = qy + r.
The quotient is decided by q = x/y and the remainder by r =
x - qy. It can be r < 0. For example
x = -5, y = -2,
(-5)/(-2) = 2 = q,
-5 = 2*(-2) -1,
then r = -1.
members
SLong quot; quotient
SLong rem; remainder
comment These members are public. Then you can use such as "m.quot.Puts();" or
change the value by a substitution. About constructors see the definition in
"slong.h" when you need.