CC: | Keith Thompson <Keith.S.Thompson [...] gmail.com> |
Subject: | Small glitch in documentation |
Date: | Tue, 9 Feb 2016 16:16:16 -0800 |
To: | bug-Math-BigInt [...] rt.cpan.org |
From: | Keith Thompson <keithsthompson [...] gmail.com> |
The documentation for Math::BigInt has the following example:
$x = Math::BigInt->new(12345678890123456789); # bad
$x = Math::BigInt->new('12345678901234567890'); # good
This is quite correct, but the example would be better if both lines used
the same value. The "bad" example doubles the first 8 and is missing the
trailing 0.
And on a 64-bit system, 12345678901234567890 doesn't lose precision. I
suggest adding more digits.
I'm also tempted to suggest inserting a space after the "(" so the digits
line up, but I'll leave that to your judgement.
Corrected example:
$x = Math::BigInt->new( 123456789012345678901234567890 ); # bad
$x = Math::BigInt->new('123456789012345678901234567890'); # good
--
Keith Thompson <Keith.S.Thompson@gmail.com>
Message body is not shown because it is too large.