Home
last modified time | relevance | path

Searched refs:BcNum (Results 1 – 11 of 11) sorted by relevance

/freebsd/contrib/bc/include/
H A Dnum.h113 typedef struct BcNum struct
141 } BcNum; argument
371 typedef void (*BcNumBinaryOp)(BcNum* a, BcNum* b, BcNum* c, size_t scale);
382 typedef void (*BcNumBinOp)(BcNum* a, BcNum* b, BcNum* restrict c, size_t scale);
394 typedef size_t (*BcNumBinaryOpReq)(const BcNum* a, const BcNum* b,
426 bc_num_init(BcNum* restrict n, size_t req);
437 bc_num_setup(BcNum* restrict n, BcDig* restrict num, size_t cap);
446 bc_num_copy(BcNum* d, const BcNum* s);
455 bc_num_createCopy(BcNum* d, const BcNum* s);
464 bc_num_createFromBigdig(BcNum* restrict n, BcBigDig val);
[all …]
H A Dprogram.h135 BcNum strmb;
139 BcNum asciify;
144 BcNum last;
300 typedef void (*BcProgramUnary)(BcResult* r, BcNum* n);
409 bc_program_negate(BcResult* r, BcNum* n);
417 bc_program_not(BcResult* r, BcNum* n);
427 bc_program_trunc(BcResult* r, BcNum* n);
435 bc_program_assignSeed(BcProgram* p, BcNum* val);
H A Dvm.h712 BcNum zero;
717 BcNum one;
720 BcNum max;
723 BcNum max2;
H A Dlang.h379 BcNum num;
478 BcNum n;
H A Dlibrary.h59 BcNum n;
172 typedef BcNum BclNum;
/freebsd/contrib/bc/src/
H A Dnum.c55 bc_num_m(BcNum* a, BcNum* b, BcNum* restrict c, size_t scale);
89 bc_num_cmpZero(const BcNum* n) in bc_num_cmpZero()
100 bc_num_int(const BcNum* n) in bc_num_int()
111 bc_num_expand(BcNum* restrict n, size_t req) in bc_num_expand()
134 bc_num_setToZero(BcNum* restrict n, size_t scale) in bc_num_setToZero()
142 bc_num_zero(BcNum* restrict n) in bc_num_zero()
148 bc_num_one(BcNum* restrict n) in bc_num_one()
161 bc_num_clean(BcNum* restrict n) in bc_num_clean()
244 bc_num_intDigits(const BcNum* n) in bc_num_intDigits()
261 bc_num_nonZeroLen(const BcNum* restrict n) in bc_num_nonZeroLen()
[all …]
H A Dlang.c167 if (nums) bc_vec_init(a, sizeof(BcNum), BC_DTOR_NUM); in bc_array_init()
196 BcNum* dnum; in bc_array_copy()
197 BcNum* snum; in bc_array_copy()
206 memcpy(dnum, snum, sizeof(BcNum)); in bc_array_copy()
222 if (a->size == sizeof(BcNum) && a->dtor == BC_DTOR_NUM) in bc_array_expand()
227 BcNum* n = bc_vec_pushEmpty(a); in bc_array_expand()
291 memcpy(&d->d.n, &src->d.n, sizeof(BcNum)); in bc_result_copy()
H A Dprogram.c57 bc_program_type_num(BcResult* r, BcNum* n) in bc_program_type_num()
114 bc_program_string(BcProgram* p, const BcNum* n) in bc_program_string()
303 static BcNum*
306 BcNum* n; in bc_program_num()
362 assert(v->size == sizeof(BcNum)); in bc_program_num()
449 bc_program_operand(BcProgram* p, BcResult** r, BcNum** n, size_t idx) in bc_program_operand()
475 bc_program_binPrep(BcProgram* p, BcResult** l, BcNum** ln, BcResult** r, in bc_program_binPrep()
476 BcNum** rn, size_t idx) in bc_program_binPrep()
534 bc_program_binOpPrep(BcProgram* p, BcResult** l, BcNum** ln, BcResult** r, in bc_program_binOpPrep()
535 BcNum** rn, size_t idx) in bc_program_binOpPrep()
[all …]
H A Dargs.c97 BcNum n; in bc_args_builtin()
390 BcNum n; in bc_args()
H A Dlibrary.c514 memcpy(BCL_NUM_NUM(ptr), n, sizeof(BcNum)); in bcl_num_insert()
1485 bcl_frandHelper(BcNum* restrict b, size_t places) in bcl_frandHelper()
1487 BcNum exp, pow, ten; in bcl_frandHelper()
1559 bcl_ifrandHelper(BcNum* restrict a, BcNum* restrict b, size_t places) in bcl_ifrandHelper()
1561 BcNum ir, fr; in bcl_ifrandHelper()
/freebsd/contrib/bc/
H A DNEWS.md881 Third, `bc` tries to reuse `BcNum`'s (the internal representation of
882 arbitary-precision numbers). If a `BcNum` has the default capacity of
884 to a list of available `BcNum`'s. And then, when a `BcNum` is allocated with a
885 capacity of `BC_NUM_DEF_SIZE` and any `BcNum`'s exist on the list of reusable
916 especially with regard to reusing `BcNum`'s. One was putting `BcNum`'s into
918 worse than `bc` did in `2.7.2`. Another was putting any `BcNum` on the reuse
919 list that had a capacity of `BC_NUM_DEF_SIZE * 2` and reusing them for `BcNum`'s
922 using `strace`, a bunch more `brk` calls showed up.) Just reusing `BcNum`'s that