bs-Zarith icon indicating copy to clipboard operation
bs-Zarith copied to clipboard

of_string should raise an exception on non-numeric characters

Open jasonperry opened this issue 4 years ago • 1 comments

It currently uses the value of int_of_char for any character. This can lead to unexpected results.

jasonperry avatar May 05 '20 21:05 jasonperry

And really of_string should return t option since there is no guarantee the string represents a number. Originally this was a direct copy and clean up of OCaml's zarith package but I see no reason to restrict it to that interface.

mchaver avatar May 06 '20 18:05 mchaver