On 2023-05-07 15:37:12 +0200, Fredrik Johansson wrote: > However, mpz_set_str returns that the string is invalid when a space > appears between the minus sign and the first digit. For example, > > mpz_set_str(x, "- 123", 10) > > does not work.
According to the GMP code (mpz/set_str.c), whitespace in the prefixes 0x/0X/0b/0B is not handled either. -- Vincent Lefèvre <vinc...@vinc17.net> - Web: <https://www.vinc17.net/> 100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/> Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon) _______________________________________________ gmp-bugs mailing list gmp-bugs@gmplib.org https://gmplib.org/mailman/listinfo/gmp-bugs