mp_rat_read_cstring handles whitespace inconsistently: it accepts " 123 / 46" but not " 123 ".
This happens because mp_int_read_cstring raises an error at trailing whitespace.
I assume mp_int_read_cstring tries to copy the behavior of strtol, but should it?
I suggest mp_int_read_cstring skip trailing whitespace.
Thanks for your work on imath.
mp_rat_read_cstringhandles whitespace inconsistently: it accepts " 123 / 46" but not " 123 ".This happens because
mp_int_read_cstringraises an error at trailing whitespace.I assume
mp_int_read_cstringtries to copy the behavior ofstrtol, but should it?I suggest
mp_int_read_cstringskip trailing whitespace.Thanks for your work on imath.