You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Perhaps it would be more consistent to change String#to_big_i so that it has the same interface as String#to_i, including the arguments underscore, strict, etc.
Having at least the _ handled would be good for consistency with respect how numbers literals are supported.
Ignoring whitespaces is already allowed by default in LibGMP and can't be turned off, so having exactly the same behavior would require manual validation. That could makes sense in String#to_big_i, but I would say to make BigInt.new consistent with the built in numbers parsing rules (ie: handle _)
In order to be consistent with how integers are handled, it will be good to allow BigInt initialisations with underscore like this:
BigInt.new("FFFFFFFF_FFFFFFFF_FFFFFFFF_FFFFFFFF_FFFFFFFE_FFFFEE37", base: 16),
The text was updated successfully, but these errors were encountered: