flint icon indicating copy to clipboard operation
flint copied to clipboard

Defining a `mag_get_str` function

Open Joel-Dahne opened this issue 1 year ago • 0 comments

There doesn't exist any mag_get_str, I think this would be convenient to have. There is currently only mag_print for printing and the output format for that is not the most convenient in many cases (for example it prints 1 as (536870912 * 2^-29))

I have noticed that the recent printf version internally converts to arf and uses arf_get_str. We are planning to switch to using this also in Arblib.jl.

Converting to arf has the drawback that the output is not always rounded upwards, so the resulting number is not necessarily an upper bound of the mag value. Since mag-functions in general always return upper bounds I think having the string conversion also return an upper bound would be appropriate.

Joel-Dahne avatar Mar 17 '24 18:03 Joel-Dahne