Lines Matching full:i
35 \f[I]#include <bcl.h>\f[R]
37 Link with \f[I]\-lbcl\f[R], and on POSIX systems, \f[I]\-lpthread\f[R]
42 \f[B]BclError bcl_start(\f[R]\f[I]void\f[R]\f[B]);\f[R]
44 \f[B]void bcl_end(\f[R]\f[I]void\f[R]\f[B]);\f[R]
46 \f[B]BclError bcl_init(\f[R]\f[I]void\f[R]\f[B]);\f[R]
48 \f[B]void bcl_free(\f[R]\f[I]void\f[R]\f[B]);\f[R]
50 \f[B]bool bcl_abortOnFatalError(\f[R]\f[I]void\f[R]\f[B]);\f[R]
52 \f[B]void bcl_setAbortOnFatalError(bool\f[R] \f[I]abrt\f[R]\f[B]);\f[R]
54 \f[B]bool bcl_leadingZeroes(\f[R]\f[I]void\f[R]\f[B]);\f[R]
57 \f[I]leadingZeroes\f[R]\f[B]);\f[R]
59 \f[B]void bcl_gc(\f[R]\f[I]void\f[R]\f[B]);\f[R]
61 \f[B]bool bcl_digitClamp(\f[R]\f[I]void\f[R]\f[B]);\f[R]
63 \f[B]void bcl_setDigitClamp(bool\f[R] \f[I]digitClamp\f[R]\f[B]);\f[R]
73 \f[B]BclContext bcl_ctxt_create(\f[R]\f[I]void\f[R]\f[B]);\f[R]
75 \f[B]void bcl_ctxt_free(BclContext\f[R] \f[I]ctxt\f[R]\f[B]);\f[R]
77 \f[B]BclError bcl_pushContext(BclContext\f[R] \f[I]ctxt\f[R]\f[B]);\f[R]
79 \f[B]void bcl_popContext(\f[R]\f[I]void\f[R]\f[B]);\f[R]
81 \f[B]BclContext bcl_context(\f[R]\f[I]void\f[R]\f[B]);\f[R]
83 \f[B]void bcl_ctxt_freeNums(BclContext\f[R] \f[I]ctxt\f[R]\f[B]);\f[R]
85 \f[B]size_t bcl_ctxt_scale(BclContext\f[R] \f[I]ctxt\f[R]\f[B]);\f[R]
87 \f[B]void bcl_ctxt_setScale(BclContext\f[R] \f[I]ctxt\f[R]\f[B],
88 size_t\f[R] \f[I]scale\f[R]\f[B]);\f[R]
90 \f[B]size_t bcl_ctxt_ibase(BclContext\f[R] \f[I]ctxt\f[R]\f[B]);\f[R]
92 \f[B]void bcl_ctxt_setIbase(BclContext\f[R] \f[I]ctxt\f[R]\f[B],
93 size_t\f[R] \f[I]ibase\f[R]\f[B]);\f[R]
95 \f[B]size_t bcl_ctxt_obase(BclContext\f[R] \f[I]ctxt\f[R]\f[B]);\f[R]
97 \f[B]void bcl_ctxt_setObase(BclContext\f[R] \f[I]ctxt\f[R]\f[B],
98 size_t\f[R] \f[I]obase\f[R]\f[B]);\f[R]
104 \f[B]BclError bcl_err(BclNumber\f[R] \f[I]n\f[R]\f[B]);\f[R]
109 \f[B]typedef struct { size_t i; } BclNumber;\f[R]
111 \f[B]BclNumber bcl_num_create(\f[R]\f[I]void\f[R]\f[B]);\f[R]
113 \f[B]void bcl_num_free(BclNumber\f[R] \f[I]n\f[R]\f[B]);\f[R]
115 \f[B]bool bcl_num_neg(BclNumber\f[R] \f[I]n\f[R]\f[B]);\f[R]
117 \f[B]void bcl_num_setNeg(BclNumber\f[R] \f[I]n\f[R]\f[B], bool\f[R]
118 \f[I]neg\f[R]\f[B]);\f[R]
120 \f[B]size_t bcl_num_scale(BclNumber\f[R] \f[I]n\f[R]\f[B]);\f[R]
122 \f[B]BclError bcl_num_setScale(BclNumber\f[R] \f[I]n\f[R]\f[B],
123 size_t\f[R] \f[I]scale\f[R]\f[B]);\f[R]
125 \f[B]size_t bcl_num_len(BclNumber\f[R] \f[I]n\f[R]\f[B]);\f[R]
131 \f[I]val\f[R]\f[B]);\f[R]
133 \f[B]char* bcl_string(BclNumber\f[R] \f[I]n\f[R]\f[B]);\f[R]
135 \f[B]char* bcl_string_keep(BclNumber\f[R] \f[I]n\f[R]\f[B]);\f[R]
137 \f[B]BclError bcl_bigdig(BclNumber\f[R] \f[I]n\f[R]\f[B], BclBigDig
138 *\f[R]\f[I]result\f[R]\f[B]);\f[R]
140 \f[B]BclError bcl_bigdig_keep(BclNumber\f[R] \f[I]n\f[R]\f[B], BclBigDig
141 *\f[R]\f[I]result\f[R]\f[B]);\f[R]
143 \f[B]BclNumber bcl_bigdig2num(BclBigDig\f[R] \f[I]val\f[R]\f[B]);\f[R]
147 \f[B]BclNumber bcl_add(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R]
148 \f[I]b\f[R]\f[B]);\f[R]
150 \f[B]BclNumber bcl_add_keep(BclNumber\f[R] \f[I]a\f[R]\f[B],
151 BclNumber\f[R] \f[I]b\f[R]\f[B]);\f[R]
153 \f[B]BclNumber bcl_sub(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R]
154 \f[I]b\f[R]\f[B]);\f[R]
156 \f[B]BclNumber bcl_sub_keep(BclNumber\f[R] \f[I]a\f[R]\f[B],
157 BclNumber\f[R] \f[I]b\f[R]\f[B]);\f[R]
159 \f[B]BclNumber bcl_mul(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R]
160 \f[I]b\f[R]\f[B]);\f[R]
162 \f[B]BclNumber bcl_mul_keep(BclNumber\f[R] \f[I]a\f[R]\f[B],
163 BclNumber\f[R] \f[I]b\f[R]\f[B]);\f[R]
165 \f[B]BclNumber bcl_div(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R]
166 \f[I]b\f[R]\f[B]);\f[R]
168 \f[B]BclNumber bcl_div_keep(BclNumber\f[R] \f[I]a\f[R]\f[B],
169 BclNumber\f[R] \f[I]b\f[R]\f[B]);\f[R]
171 \f[B]BclNumber bcl_mod(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R]
172 \f[I]b\f[R]\f[B]);\f[R]
174 \f[B]BclNumber bcl_mod_keep(BclNumber\f[R] \f[I]a\f[R]\f[B],
175 BclNumber\f[R] \f[I]b\f[R]\f[B]);\f[R]
177 \f[B]BclNumber bcl_pow(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R]
178 \f[I]b\f[R]\f[B]);\f[R]
180 \f[B]BclNumber bcl_pow_keep(BclNumber\f[R] \f[I]a\f[R]\f[B],
181 BclNumber\f[R] \f[I]b\f[R]\f[B]);\f[R]
183 \f[B]BclNumber bcl_lshift(BclNumber\f[R] \f[I]a\f[R]\f[B],
184 BclNumber\f[R] \f[I]b\f[R]\f[B]);\f[R]
186 \f[B]BclNumber bcl_lshift_keep(BclNumber\f[R] \f[I]a\f[R]\f[B],
187 BclNumber\f[R] \f[I]b\f[R]\f[B]);\f[R]
189 \f[B]BclNumber bcl_rshift(BclNumber\f[R] \f[I]a\f[R]\f[B],
190 BclNumber\f[R] \f[I]b\f[R]\f[B]);\f[R]
192 \f[B]BclNumber bcl_rshift_keep(BclNumber\f[R] \f[I]a\f[R]\f[B],
193 BclNumber\f[R] \f[I]b\f[R]\f[B]);\f[R]
195 \f[B]BclNumber bcl_sqrt(BclNumber\f[R] \f[I]a\f[R]\f[B]);\f[R]
197 \f[B]BclNumber bcl_sqrt_keep(BclNumber\f[R] \f[I]a\f[R]\f[B]);\f[R]
199 \f[B]BclError bcl_divmod(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R]
200 \f[I]b\f[R]\f[B], BclNumber *\f[R]\f[I]c\f[R]\f[B], BclNumber
201 *\f[R]\f[I]d\f[R]\f[B]);\f[R]
203 \f[B]BclError bcl_divmod_keep(BclNumber\f[R] \f[I]a\f[R]\f[B],
204 BclNumber\f[R] \f[I]b\f[R]\f[B], BclNumber *\f[R]\f[I]c\f[R]\f[B],
205 BclNumber *\f[R]\f[I]d\f[R]\f[B]);\f[R]
207 \f[B]BclNumber bcl_modexp(BclNumber\f[R] \f[I]a\f[R]\f[B],
208 BclNumber\f[R] \f[I]b\f[R]\f[B], BclNumber\f[R] \f[I]c\f[R]\f[B]);\f[R]
210 \f[B]BclNumber bcl_modexp_keep(BclNumber\f[R] \f[I]a\f[R]\f[B],
211 BclNumber\f[R] \f[I]b\f[R]\f[B], BclNumber\f[R] \f[I]c\f[R]\f[B]);\f[R]
215 \f[B]void bcl_zero(BclNumber\f[R] \f[I]n\f[R]\f[B]);\f[R]
217 \f[B]void bcl_one(BclNumber\f[R] \f[I]n\f[R]\f[B]);\f[R]
219 \f[B]ssize_t bcl_cmp(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R]
220 \f[I]b\f[R]\f[B]);\f[R]
222 \f[B]BclError bcl_copy(BclNumber\f[R] \f[I]d\f[R]\f[B], BclNumber\f[R]
223 \f[I]s\f[R]\f[B]);\f[R]
225 \f[B]BclNumber bcl_dup(BclNumber\f[R] \f[I]s\f[R]\f[B]);\f[R]
238 \f[B]BclNumber bcl_irand(BclNumber\f[R] \f[I]a\f[R]\f[B]);\f[R]
240 \f[B]BclNumber bcl_irand_keep(BclNumber\f[R] \f[I]a\f[R]\f[B]);\f[R]
242 \f[B]BclNumber bcl_frand(size_t\f[R] \f[I]places\f[R]\f[B]);\f[R]
244 \f[B]BclNumber bcl_ifrand(BclNumber\f[R] \f[I]a\f[R]\f[B], size_t\f[R]
245 \f[I]places\f[R]\f[B]);\f[R]
247 \f[B]BclNumber bcl_ifrand_keep(BclNumber\f[R] \f[I]a\f[R]\f[B],
248 size_t\f[R] \f[I]places\f[R]\f[B]);\f[R]
251 \f[I]n\f[R]\f[B]);\f[R]
254 \f[I]n\f[R]\f[B]);\f[R]
257 \f[I]seed\f[R]\f[B][\f[R]\f[I]BCL_SEED_SIZE\f[R]\f[B]]);\f[R]
259 \f[B]void bcl_rand_reseed(\f[R]\f[I]void\f[R]\f[B]);\f[R]
261 \f[B]BclNumber bcl_rand_seed2num(\f[R]\f[I]void\f[R]\f[B]);\f[R]
263 \f[B]BclRandInt bcl_rand_int(\f[R]\f[I]void\f[R]\f[B]);\f[R]
266 \f[I]bound\f[R]\f[B]);\f[R]
282 \f[B]BclError bcl_start(\f[R]\f[I]void\f[R]\f[B])\f[R]
285 only be called \f[I]once\f[R].
303 \f[B]void bcl_end(\f[R]\f[I]void\f[R]\f[B])\f[R]
305 This function must only be called \f[I]once\f[R].
315 \f[B]BclError bcl_init(\f[R]\f[I]void\f[R]\f[B])\f[R]
318 matched by a call to \f[B]bcl_free(\f[R]\f[I]void\f[R]\f[B])\f[R].
323 This function \f[I]must\f[R] be called from the thread that it is
342 \f[B]void bcl_free(\f[R]\f[I]void\f[R]\f[B])\f[R]
347 This function \f[I]must\f[R] be called from the thread that it is
355 \f[B]bool bcl_abortOnFatalError(\f[R]\f[I]void\f[R]\f[B])\f[R]
364 This value is \f[I]thread\-local\f[R]; it applies to just the thread it
370 \f[B]void bcl_setAbortOnFatalError(bool\f[R] \f[I]abrt\f[R]\f[B])\f[R]
372 If \f[I]abrt\f[R] is \f[B]false\f[R], bcl(3) will not cause a
374 If \f[I]abrt\f[R] is \f[B]true\f[R], bcl(3) will cause a
378 This value is \f[I]thread\-local\f[R]; it applies to just the thread it
384 \f[B]bool bcl_leadingZeroes(\f[R]\f[I]void\f[R]\f[B])\f[R]
391 This value is \f[I]thread\-local\f[R]; it applies to just the thread it
397 \f[B]void bcl_setLeadingZeroes(bool\f[R] \f[I]leadingZeroes\f[R]\f[B])\f[R]
401 If \f[I]leadingZeroes\f[R] is \f[B]true\f[R], leading zeroes will be
405 This value is \f[I]thread\-local\f[R]; it applies to just the thread it
409 \f[B]bool bcl_digitClamp(\f[R]\f[I]void\f[R]\f[B])\f[R]
417 If this is \f[I]not\f[R] true, then digits are treated as though they
429 This value is \f[I]thread\-local\f[R]; it applies to just the thread it
435 \f[B]void bcl_setDigitClamp(bool\f[R] \f[I]digitClamp\f[R]\f[B])\f[R]
439 \f[B]bcl_digitClamp(\f[R]\f[I]void\f[R]\f[B])\f[R] function.
442 This value is \f[I]thread\-local\f[R]; it applies to just the thread it
446 \f[B]void bcl_gc(\f[R]\f[I]void\f[R]\f[B])\f[R]
448 This only frees the memory of numbers that are \f[I]not\f[R] in use, so
504 \f[B]BclContext bcl_ctxt_create(\f[R]\f[I]void\f[R]\f[B])\f[R]
508 \f[B]void bcl_ctxt_free(BclContext\f[R] \f[I]ctxt\f[R]\f[B])\f[R]
509 Frees \f[I]ctxt\f[R], after which it is no longer valid.
512 \f[B]BclError bcl_pushContext(BclContext\f[R] \f[I]ctxt\f[R]\f[B])\f[R]
513 Pushes \f[I]ctxt\f[R] onto bcl(3)\[cq]s stack of contexts.
514 \f[I]ctxt\f[R] must have been created with
515 \f[B]bcl_ctxt_create(\f[R]\f[I]void\f[R]\f[B])\f[R].
523 There \f[I]must\f[R] be a valid context to do any arithmetic.
526 \f[B]void bcl_popContext(\f[R]\f[I]void\f[R]\f[B])\f[R]
529 \f[B]BclContext bcl_context(\f[R]\f[I]void\f[R]\f[B])\f[R]
532 \f[B]void bcl_ctxt_freeNums(BclContext\f[R] \f[I]ctxt\f[R]\f[B])\f[R]
533 Frees all numbers in use that are associated with \f[I]ctxt\f[R].
535 \f[I]ctxt\f[R] after calling this procedure unless such numbers have
536 been created with \f[B]bcl_num_create(\f[R]\f[I]void\f[R]\f[B])\f[R]
539 \f[B]size_t bcl_ctxt_scale(BclContext\f[R] \f[I]ctxt\f[R]\f[B])\f[R]
542 \f[B]void bcl_ctxt_setScale(BclContext\f[R] \f[I]ctxt\f[R]\f[B], size_t\f[R] \f[I]scale\f[R]\f[B])\f[R]
544 \f[I]scale\f[R].
546 \f[B]size_t bcl_ctxt_ibase(BclContext\f[R] \f[I]ctxt\f[R]\f[B])\f[R]
549 \f[B]void bcl_ctxt_setIbase(BclContext\f[R] \f[I]ctxt\f[R]\f[B], size_t\f[R] \f[I]ibase\f[R]\f[B])\f[R]
551 \f[I]ibase\f[R].
552 If the argument \f[I]ibase\f[R] is invalid, it clamped, so an
553 \f[I]ibase\f[R] of \f[B]0\f[R] or \f[B]1\f[R] is clamped to \f[B]2\f[R],
556 \f[B]size_t bcl_ctxt_obase(BclContext\f[R] \f[I]ctxt\f[R]\f[B])\f[R]
559 \f[B]void bcl_ctxt_setObase(BclContext\f[R] \f[I]ctxt\f[R]\f[B], size_t\f[R] \f[I]obase\f[R]\f[B])\f[R]
561 \f[I]obase\f[R].
568 \f[B]BclError bcl_err(BclNumber\f[R] \f[I]n\f[R]\f[B])\f[R]
586 \f[B]BclNumber bcl_num_create(\f[R]\f[I]void\f[R]\f[B])\f[R]
599 \f[B]void bcl_num_free(BclNumber\f[R] \f[I]n\f[R]\f[B])\f[R]
600 Frees \f[I]n\f[R].
601 It is undefined behavior to use \f[I]n\f[R] after calling this function.
603 \f[B]bool bcl_num_neg(BclNumber\f[R] \f[I]n\f[R]\f[B])\f[R]
604 Returns \f[B]true\f[R] if \f[I]n\f[R] is negative, \f[B]false\f[R]
607 \f[B]void bcl_num_setNeg(BclNumber\f[R] \f[I]n\f[R]\f[B], bool\f[R] \f[I]neg\f[R]\f[B])\f[R]
608 Sets \f[I]n\f[R]\[cq]s sign to \f[I]neg\f[R], where \f[B]true\f[R] is
611 \f[B]size_t bcl_num_scale(BclNumber\f[R] \f[I]n\f[R]\f[B])\f[R]
612 Returns the \f[I]scale\f[R] of \f[I]n\f[R].
615 The \f[I]scale\f[R] of a number is the number of decimal places it has
619 \f[B]BclError bcl_num_setScale(BclNumber\f[R] \f[I]n\f[R]\f[B], size_t\f[R] \f[I]scale\f[R]\f[B])\f[R]
620 Sets the \f[I]scale\f[R] of \f[I]n\f[R] to the argument \f[I]scale\f[R].
621 If the argument \f[I]scale\f[R] is greater than the \f[I]scale\f[R] of
622 \f[I]n\f[R], \f[I]n\f[R] is extended.
623 If the argument \f[I]scale\f[R] is less than the \f[I]scale\f[R] of
624 \f[I]n\f[R], \f[I]n\f[R] is truncated.
637 \f[B]size_t bcl_num_len(BclNumber\f[R] \f[I]n\f[R]\f[B])\f[R]
638 Returns the number of \f[I]significant decimal digits\f[R] in
639 \f[I]n\f[R].
648 \f[B]BclNumber bcl_parse(const char *restrict\f[R] \f[I]val\f[R]\f[B])\f[R]
653 \f[I]val\f[R] must be non\-\f[B]NULL\f[R] and a valid string.
670 \f[B]char* bcl_string(BclNumber\f[R] \f[I]n\f[R]\f[B])\f[R]
671 Returns a string representation of \f[I]n\f[R] according the the current
676 \f[I]n\f[R] is consumed; it cannot be used after the call.
680 \f[B]char* bcl_string_keep(BclNumber\f[R] \f[I]n\f[R]\f[B])\f[R]
681 Returns a string representation of \f[I]n\f[R] according the the current
685 \f[B]BclError bcl_bigdig(BclNumber\f[R] \f[I]n\f[R]\f[B], BclBigDig *\f[R]\f[I]result\f[R]\f[B])\f[R]
686 Converts \f[I]n\f[R] into a \f[B]BclBigDig\f[R] and returns the result
687 in the space pointed to by \f[I]result\f[R].
690 \f[I]a\f[R] must be smaller than \f[B]BC_OVERFLOW_MAX\f[R].
702 \f[I]n\f[R] is consumed; it cannot be used after the call.
706 \f[B]BclError bcl_bigdig_keep(BclNumber\f[R] \f[I]n\f[R]\f[B], BclBigDig *\f[R]\f[I]result\f[R]\f[B])\f[R]
707 Converts \f[I]n\f[R] into a \f[B]BclBigDig\f[R] and returns the result
708 in the space pointed to by \f[I]result\f[R].
711 \f[I]a\f[R] must be smaller than \f[B]BC_OVERFLOW_MAX\f[R].
724 \f[B]BclNumber bcl_bigdig2num(BclBigDig\f[R] \f[I]val\f[R]\f[B])\f[R]
725 Creates a \f[B]BclNumber\f[R] from \f[I]val\f[R].
752 \f[B]BclNumber bcl_add(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
753 Adds \f[I]a\f[R] and \f[I]b\f[R] and returns the result.
754 The \f[I]scale\f[R] of the result is the max of the \f[I]scale\f[R]s of
755 \f[I]a\f[R] and \f[I]b\f[R].
758 \f[I]a\f[R] and \f[I]b\f[R] are consumed; they cannot be used after the
762 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
775 \f[B]BclNumber bcl_add_keep(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
776 Adds \f[I]a\f[R] and \f[I]b\f[R] and returns the result.
777 The \f[I]scale\f[R] of the result is the max of the \f[I]scale\f[R]s of
778 \f[I]a\f[R] and \f[I]b\f[R].
781 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
794 \f[B]BclNumber bcl_sub(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
795 Subtracts \f[I]b\f[R] from \f[I]a\f[R] and returns the result.
796 The \f[I]scale\f[R] of the result is the max of the \f[I]scale\f[R]s of
797 \f[I]a\f[R] and \f[I]b\f[R].
800 \f[I]a\f[R] and \f[I]b\f[R] are consumed; they cannot be used after the
804 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
817 \f[B]BclNumber bcl_sub_keep(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
818 Subtracts \f[I]b\f[R] from \f[I]a\f[R] and returns the result.
819 The \f[I]scale\f[R] of the result is the max of the \f[I]scale\f[R]s of
820 \f[I]a\f[R] and \f[I]b\f[R].
823 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
836 \f[B]BclNumber bcl_mul(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
837 Multiplies \f[I]a\f[R] and \f[I]b\f[R] and returns the result.
838 If \f[I]ascale\f[R] is the \f[I]scale\f[R] of \f[I]a\f[R] and
839 \f[I]bscale\f[R] is the \f[I]scale\f[R] of \f[I]b\f[R], the
840 \f[I]scale\f[R] of the result is equal to
845 \f[I]a\f[R] and \f[I]b\f[R] are consumed; they cannot be used after the
849 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
862 \f[B]BclNumber bcl_mul_keep(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
863 Multiplies \f[I]a\f[R] and \f[I]b\f[R] and returns the result.
864 If \f[I]ascale\f[R] is the \f[I]scale\f[R] of \f[I]a\f[R] and
865 \f[I]bscale\f[R] is the \f[I]scale\f[R] of \f[I]b\f[R], the
866 \f[I]scale\f[R] of the result is equal to
871 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
884 \f[B]BclNumber bcl_div(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
885 Divides \f[I]a\f[R] by \f[I]b\f[R] and returns the result.
886 The \f[I]scale\f[R] of the result is the \f[I]scale\f[R] of the current
890 \f[I]b\f[R] cannot be \f[B]0\f[R].
892 \f[I]a\f[R] and \f[I]b\f[R] are consumed; they cannot be used after the
896 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
911 \f[B]BclNumber bcl_div_keep(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
912 Divides \f[I]a\f[R] by \f[I]b\f[R] and returns the result.
913 The \f[I]scale\f[R] of the result is the \f[I]scale\f[R] of the current
917 \f[I]b\f[R] cannot be \f[B]0\f[R].
919 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
934 \f[B]BclNumber bcl_mod(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
935 Divides \f[I]a\f[R] by \f[I]b\f[R] to the \f[I]scale\f[R] of the current
940 \f[I]b\f[R] cannot be \f[B]0\f[R].
942 \f[I]a\f[R] and \f[I]b\f[R] are consumed; they cannot be used after the
946 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
961 \f[B]BclNumber bcl_mod_keep(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
962 Divides \f[I]a\f[R] by \f[I]b\f[R] to the \f[I]scale\f[R] of the current
967 \f[I]b\f[R] cannot be \f[B]0\f[R].
969 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
984 \f[B]BclNumber bcl_pow(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
985 Calculates \f[I]a\f[R] to the power of \f[I]b\f[R] to the
986 \f[I]scale\f[R] of the current context.
987 \f[I]b\f[R] must be an integer, but can be negative.
988 If it is negative, \f[I]a\f[R] must be non\-zero.
991 \f[I]b\f[R] must be an integer.
992 If \f[I]b\f[R] is negative, \f[I]a\f[R] must not be \f[B]0\f[R].
994 \f[I]a\f[R] must be smaller than \f[B]BC_OVERFLOW_MAX\f[R].
997 \f[I]a\f[R] and \f[I]b\f[R] are consumed; they cannot be used after the
1001 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
1020 \f[B]BclNumber bcl_pow_keep(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
1021 Calculates \f[I]a\f[R] to the power of \f[I]b\f[R] to the
1022 \f[I]scale\f[R] of the current context.
1023 \f[I]b\f[R] must be an integer, but can be negative.
1024 If it is negative, \f[I]a\f[R] must be non\-zero.
1027 \f[I]b\f[R] must be an integer.
1028 If \f[I]b\f[R] is negative, \f[I]a\f[R] must not be \f[B]0\f[R].
1030 \f[I]a\f[R] must be smaller than \f[B]BC_OVERFLOW_MAX\f[R].
1033 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
1052 \f[B]BclNumber bcl_lshift(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
1053 Shifts \f[I]a\f[R] left (moves the radix right) by \f[I]b\f[R] places
1056 \f[I]b\f[R] must be an integer.
1059 \f[I]b\f[R] must be an integer.
1061 \f[I]a\f[R] and \f[I]b\f[R] are consumed; they cannot be used after the
1065 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
1080 \f[B]BclNumber bcl_lshift_keep(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
1081 Shifts \f[I]a\f[R] left (moves the radix right) by \f[I]b\f[R] places
1084 \f[I]b\f[R] must be an integer.
1087 \f[I]b\f[R] must be an integer.
1089 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
1104 \f[B]BclNumber bcl_rshift(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
1105 Shifts \f[I]a\f[R] right (moves the radix left) by \f[I]b\f[R] places
1108 \f[I]b\f[R] must be an integer.
1111 \f[I]b\f[R] must be an integer.
1113 \f[I]a\f[R] and \f[I]b\f[R] are consumed; they cannot be used after the
1117 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
1132 \f[B]BclNumber bcl_rshift_keep(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
1133 Shifts \f[I]a\f[R] right (moves the radix left) by \f[I]b\f[R] places
1136 \f[I]b\f[R] must be an integer.
1139 \f[I]b\f[R] must be an integer.
1141 \f[I]a\f[R] and \f[I]b\f[R] can be the same number.
1156 \f[B]BclNumber bcl_sqrt(BclNumber\f[R] \f[I]a\f[R]\f[B])\f[R]
1157 Calculates the square root of \f[I]a\f[R] and returns the result.
1158 The \f[I]scale\f[R] of the result is equal to the \f[B]scale\f[R] of the
1162 \f[I]a\f[R] cannot be negative.
1164 \f[I]a\f[R] is consumed; it cannot be used after the call.
1180 \f[B]BclNumber bcl_sqrt_keep(BclNumber\f[R] \f[I]a\f[R]\f[B])\f[R]
1181 Calculates the square root of \f[I]a\f[R] and returns the result.
1182 The \f[I]scale\f[R] of the result is equal to the \f[B]scale\f[R] of the
1186 \f[I]a\f[R] cannot be negative.
1201 \f[B]BclError bcl_divmod(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B], BclNumber *\f[R]\f[I]c\f[R]\f[B], BclNumber *\f[R]\f[I]d\f[R]\f[B])\f[R]
1202 Divides \f[I]a\f[R] by \f[I]b\f[R] and returns the quotient in a new
1203 number which is put into the space pointed to by \f[I]c\f[R], and puts
1205 \f[I]d\f[R].
1208 \f[I]b\f[R] cannot be \f[B]0\f[R].
1210 \f[I]a\f[R] and \f[I]b\f[R] are consumed; they cannot be used after the
1214 \f[I]c\f[R] and \f[I]d\f[R] cannot point to the same place, nor can they
1215 point to the space occupied by \f[I]a\f[R] or \f[I]b\f[R].
1229 \f[B]BclError bcl_divmod_keep(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B], BclNumber *\f[R]\f[I]c\f[R]\f[B], BclNumber *\f[R]\f[I]d\f[R]\f[B])\f[R]
1230 Divides \f[I]a\f[R] by \f[I]b\f[R] and returns the quotient in a new
1231 number which is put into the space pointed to by \f[I]c\f[R], and puts
1233 \f[I]d\f[R].
1236 \f[I]b\f[R] cannot be \f[B]0\f[R].
1238 \f[I]c\f[R] and \f[I]d\f[R] cannot point to the same place, nor can they
1239 point to the space occupied by \f[I]a\f[R] or \f[I]b\f[R].
1253 \f[B]BclNumber bcl_modexp(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B], BclNumber\f[R] \f[I]c\f[R]\f[B])\f[R]
1254 Computes a modular exponentiation where \f[I]a\f[R] is the base,
1255 \f[I]b\f[R] is the exponent, and \f[I]c\f[R] is the modulus, and returns
1257 The \f[I]scale\f[R] of the result is equal to the \f[B]scale\f[R] of the
1261 \f[I]a\f[R], \f[I]b\f[R], and \f[I]c\f[R] must be integers.
1262 \f[I]c\f[R] must not be \f[B]0\f[R].
1263 \f[I]b\f[R] must not be negative.
1265 \f[I]a\f[R], \f[I]b\f[R], and \f[I]c\f[R] are consumed; they cannot be
1286 \f[B]BclNumber bcl_modexp_keep(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B], BclNumber\f[R] \f[I]c\f[R]\f[B])\f[R]
1287 Computes a modular exponentiation where \f[I]a\f[R] is the base,
1288 \f[I]b\f[R] is the exponent, and \f[I]c\f[R] is the modulus, and returns
1290 The \f[I]scale\f[R] of the result is equal to the \f[B]scale\f[R] of the
1294 \f[I]a\f[R], \f[I]b\f[R], and \f[I]c\f[R] must be integers.
1295 \f[I]c\f[R] must not be \f[B]0\f[R].
1296 \f[I]b\f[R] must not be negative.
1316 \f[B]void bcl_zero(BclNumber\f[R] \f[I]n\f[R]\f[B])\f[R]
1317 Sets \f[I]n\f[R] to \f[B]0\f[R].
1319 \f[B]void bcl_one(BclNumber\f[R] \f[I]n\f[R]\f[B])\f[R]
1320 Sets \f[I]n\f[R] to \f[B]1\f[R].
1322 \f[B]ssize_t bcl_cmp(BclNumber\f[R] \f[I]a\f[R]\f[B], BclNumber\f[R] \f[I]b\f[R]\f[B])\f[R]
1323 Compares \f[I]a\f[R] and \f[I]b\f[R] and returns \f[B]0\f[R] if
1324 \f[I]a\f[R] and \f[I]b\f[R] are equal, \f[B]<0\f[R] if \f[I]a\f[R] is
1325 less than \f[I]b\f[R], and \f[B]>0\f[R] if \f[I]a\f[R] is greater than
1326 \f[I]b\f[R].
1328 \f[B]BclError bcl_copy(BclNumber\f[R] \f[I]d\f[R]\f[B], BclNumber\f[R] \f[I]s\f[R]\f[B])\f[R]
1329 Copies \f[I]s\f[R] into \f[I]d\f[R].
1342 \f[B]BclNumber bcl_dup(BclNumber\f[R] \f[I]s\f[R]\f[B])\f[R]
1344 \f[I]s\f[R].
1358 The pseudo\-random number generator in bcl(3) is a \f[I]seeded\f[R]
1379 char[\f[R]\f[I]BCL_SEED_SIZE\f[R]\f[B]])\f[R]
1381 \f[B]bcl_rand_reseed(\f[R]\f[I]void\f[R]\f[B])\f[R]
1407 \f[B]BclNumber bcl_irand(BclNumber\f[R] \f[I]a\f[R]\f[B])\f[R]
1408 Returns a random number that is not larger than \f[I]a\f[R] in a new
1410 If \f[I]a\f[R] is \f[B]0\f[R] or \f[B]1\f[R], the new number is equal to
1418 \f[I]a\f[R] must be an integer and non\-negative.
1420 \f[I]a\f[R] is consumed; it cannot be used after the call.
1440 \f[B]BclNumber bcl_irand_keep(BclNumber\f[R] \f[I]a\f[R]\f[B])\f[R]
1441 Returns a random number that is not larger than \f[I]a\f[R] in a new
1443 If \f[I]a\f[R] is \f[B]0\f[R] or \f[B]1\f[R], the new number is equal to
1451 \f[I]a\f[R] must be an integer and non\-negative.
1470 \f[B]BclNumber bcl_frand(size_t\f[R] \f[I]places\f[R]\f[B])\f[R]
1472 (exclusive) that has \f[I]places\f[R] decimal digits after the radix
1474 There are no limits on \f[I]places\f[R].
1488 \f[B]BclNumber bcl_ifrand(BclNumber\f[R] \f[I]a\f[R]\f[B], size_t\f[R] \f[I]places\f[R]\f[B])\f[R]
1489 Returns a random number less than \f[I]a\f[R] with \f[I]places\f[R]
1491 There are no limits on \f[I]a\f[R] or \f[I]places\f[R].
1494 \f[I]a\f[R] must be an integer and non\-negative.
1496 \f[I]a\f[R] is consumed; it cannot be used after the call.
1516 \f[B]BclNumber bcl_ifrand_keep(BclNumber\f[R] \f[I]a\f[R]\f[B], size_t\f[R] \f[I]places\f[R]\f[B])\f[R]
1517 Returns a random number less than \f[I]a\f[R] with \f[I]places\f[R]
1519 There are no limits on \f[I]a\f[R] or \f[I]places\f[R].
1522 \f[I]a\f[R] must be an integer and non\-negative.
1541 \f[B]BclError bcl_rand_seedWithNum(BclNumber\f[R] \f[I]n\f[R]\f[B])\f[R]
1542 Seeds the PRNG with \f[I]n\f[R].
1545 \f[I]n\f[R] is consumed.
1556 Note that if \f[B]bcl_rand_seed2num(\f[R]\f[I]void\f[R]\f[B])\f[R] or
1559 \f[I]n\f[R].
1562 \f[B]BclError bcl_rand_seedWithNum_keep(BclNumber\f[R] \f[I]n\f[R]\f[B])\f[R]
1563 Seeds the PRNG with \f[I]n\f[R].
1575 Note that if \f[B]bcl_rand_seed2num(\f[R]\f[I]void\f[R]\f[B])\f[R] or
1578 \f[I]n\f[R].
1581 \f[B]BclError bcl_rand_seed(unsigned char\f[R] \f[I]seed\f[R]\f[B][\f[R]\f[I]BCL_SEED_SIZE\f[R]\f[B]])\f[R]
1582 Seeds the PRNG with the bytes in \f[I]seed\f[R].
1591 \f[B]void bcl_rand_reseed(\f[R]\f[I]void\f[R]\f[B])\f[R]
1600 \f[B]BclNumber bcl_rand_seed2num(\f[R]\f[I]void\f[R]\f[B])\f[R]
1615 \f[B]BclRandInt bcl_rand_int(\f[R]\f[I]void\f[R]\f[B])\f[R]
1623 \f[B]BclRandInt bcl_rand_bounded(BclRandInt\f[R] \f[I]bound\f[R]\f[B])\f[R]
1624 Returns a random integer between \f[B]0\f[R] and \f[I]bound\f[R]
1724 It is highly recommended that client libraries do \f[I]not\f[R] activate
1739 It is highly recommended that client libraries do \f[I]not\f[R] activate
1743 bcl(3) is \f[I]MT\-Safe\f[R]: it is safe to call any functions from more
1745 However, is is \f[I]not\f[R] safe to pass any data between threads
1748 bcl(3) is not \f[I]async\-signal\-safe\f[R].