The patch looks good to me. Thanks.
On Tue Oct 05 15:38:22 2010, pjacklam wrote:
Show quoted text> I think the most consistent would be if Math::BigInt and Math::BigFloat
> accepted the same input as Perl itself. Perl allows underscores in
> numbers almost everywhere except at the beginning of the number, but a
> warning is printed ("Misplaced _ in number") is printed if an underscore
> is not between digits of there are multiple underscores following each
> other.
>
> Here are some variants that are accepted without a warning: "0b1_1",
> "1_2", "1_2.3_4", "1_2.3_4e5_6".
>
> Here are some variants that are accepted, but gives the mentioned
> warning: "0b_11", "0b11_", "0b1__1", "12_", "1__2", "12_.34",
> "12_._34_e_56_".
>
> Coincidentally, I noticed this some time ago and started fixing it. It
> was more difficult that I expected, since the code is terribly messy.
> The code is highly optimized for speed rather than clarity and
> maintainability (contrary to what is mentioned in the file "GOALS"), and
> there are hardly any comments mentioning why things are done the way
> they are. After – I guess – two days of efficient work, I understand how
> it all works together and fixed the code. I added some comments and also
> rewrote some code (_split() is now both faster and easier to
> understand). I also had to edit some tests since some input used to
> return NaN, but now returns a number.
>
> I have attached the patch file. All the tests pass. I really hope this
> gets through. It was a lot of work.