flintlib / arb

Arb has been merged into FLINT -- use https://github.com/flintlib/flint/ instead
http://arblib.org/
GNU Lesser General Public License v2.1
457 stars 137 forks source link

Feature request: `arf_set_str` #439

Open MacroUniverse opened 1 year ago

MacroUniverse commented 1 year ago

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;
}