MCPcopy Create free account
hub / github.com/Snapchat/Valdi / bf_set

Function bf_set

third-party/quickjs/src/quickjs/libbf.c:302–314  ·  view source on GitHub ↗

return 0 or BF_ST_MEM_ERROR */

Source from the content-addressed store, hash-verified

300
301/* return 0 or BF_ST_MEM_ERROR */
302int bf_set(bf_t *r, const bf_t *a)
303{
304 if (r == a)
305 return 0;
306 if (bf_resize(r, a->len)) {
307 bf_set_nan(r);
308 return BF_ST_MEM_ERROR;
309 }
310 r->sign = a->sign;
311 r->expn = a->expn;
312 memcpy(r->tab, a->tab, a->len * sizeof(limb_t));
313 return 0;
314}
315
316/* equivalent to bf_set(r, a); bf_delete(a) */
317void bf_move(bf_t *r, bf_t *a)

Callers 15

bf_add_internalFunction · 0.85
bf_tdivremuFunction · 0.85
bf_divremFunction · 0.85
bf_sqrtremFunction · 0.85
bf_sqrtFunction · 0.85
bf_pow_uiFunction · 0.85
bf_get_float64Function · 0.85
bf_mul_pow_radixFunction · 0.85
bf_atof_internalFunction · 0.85
bf_convert_to_radixFunction · 0.85
bf_ftoa_internalFunction · 0.85
bf_const_log2_recFunction · 0.85

Calls 2

bf_resizeFunction · 0.85
bf_set_nanFunction · 0.85

Tested by

no test coverage detected