Multiprecision constructors have very little input verification
This issue is about the multiprecision classes amp::ampf[PRECISION]
and amp::campf[PRECISION]
, which in the python package usually are given the aliases fMP
and cMP
, respectively. When these are constructed from strings (which is recommended to ensure maximum precision), they do not first check that the string is only numeric, for instance, it just silently takes on the best it can parse.
Some examples:
>>> fMP("3,14") == 3
True
>>> fMP("hello world") == 0
True
>>> fMP("1st a number, then 10+ letters") == 1
True
Some manual input checking should therefore be done.