arb icon indicating copy to clipboard operation
arb copied to clipboard

Feature request: `arf_set_str`

Open MacroUniverse opened this issue 2 years ago • 0 comments

Since there is a function char * arf_get_str(const arf_t x, slong prec), it will be good to also define a function with the effect of

inline int arf_set_str(arf_t res, const char * inp, slong prec)
{
    arb_t y; arb_init(y);
    if (arb_set_str(y, inp, prec))
        return 1;
    arf_set(res, &y->mid);
    return 0;
}

MacroUniverse avatar Oct 16 '22 23:10 MacroUniverse