| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Extend bmodpow() to handle negative numbers.
- dist/Math-BigInt/lib/Math/BigInt.pm: Fix bmodpow() code and make the
documentation style more like that of other methods.
- dist/Math-BigInt/t/bigintpm.inc: Edit test results so they match new
behaviour, i.e., where earlier a NaN was returned, there are now
some cases where an integer is returned, since bmodpow() now also
handles negative numbers. Also include test cases from RT 63237. The
tests themselves have all been verified to be correct using other
software.
- dist/Math-BigRat/t/bigratpm.inc: Fix test case so it matches the new
behaviour of Math::BigInt->bmodinv(). Math::BigRat->bmodinv() only
handles integers, and is essentially just a front-end to
Math::BigInt->bmodinv().
- dist/Math-BigInt/t/bare_mbi.t: Increment test count.
- dist/Math-BigInt/t/bigintpm.t: Increment test count.
- dist/Math-BigInt/t/sub_mbi.t: Increment test count.
|
|
|
|
|
|
|
|
|
|
|
|
| |
This bug stemmed from Latin1 characters not matching any (non-complemented)
character class in /d semantics when the target string is no utf8; but having
unicode semantics when it isn't. The solution here is to add a special flag.
There were several tests that relied on the broken behavior, specifically they
tested that \xff isn't a printable word character even in utf8. I changed the
deparse test to instead use a non-printable code point, and I changed the ones
in re_tests to be TODOs, and will change them back using /a when that is
shortly added.
|
|
|
|
|
|
|
|
|
|
| |
Remove the tests that try to send actual compile and link commands
to the shell and predict what their output will be. That can't
be done portably in the base class -- that's what the overrides
are for. Testing that properties get populated correctly and so
forth should be reasonably portable, though there is no guarantee
some of these won't be overridden as well (but leave them in for
now).
|
|
|
|
|
| |
Code in dist/ isn't yet subject to all the warnings flags that the core C
code enjoys.
|
|
|
|
|
|
|
|
|
|
|
| |
4cf5eae5e58faebb changed S_ithread_create() to avoid creating an AV, by
passing the thread creation arguments as pointers to a block of memory
holding SVs. Unfortunately, this inadvertently introduced a subtle bug,
because the block of memory is on the Perl stack, which can move as a side
effect of being reallocated to extend it. Hence pass in the offset on the
stack instead, read the current value of the relevant interpreter's stack
at the point of access, and copy all the SVs away before making any further
calls which might cause reallocation.
|
|
|
|
|
| |
With a small amount of refactoring, compatibility across different perl
versions can be achieved with less duplication.
|
| |
|
|
|
|
|
| |
Whilst it is possible to open regen/opcode.pl and parse it to find the __END__
token, it's not the cleanest approach.
|
|
|
|
|
|
|
|
|
| |
# New Ticket Created by (Peter J. Acklam)
# Please include the string: [perl #81888]
# in the subject line of all future correspondence about this issue.
# <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=81888 >
Signed-off-by: Abigail <abigail@abigail.be>
|
|
|
|
| |
hadn't worked for years before that.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The following standard definition is used: z is the modular inverse of
x (mod y) if and only if x*z (mod y) = 1 (mod y).
- dist/Math-BigInt/lib/Math/BigInt.pm: Fix the code in bmodinv() so it can
handle negative arguments. The code can be optimized further for speed,
but correctnes first.
- dist/Math-BigInt/t/bigintpm.inc: Fix the test case for modinv(-3, -5).
The output should be -3, since -3 * -3 (mod -5) = -9 (mod -5) = -4, and
1 (mod -5) = -4.
- dist/Math-BigRat/t/bigratpm.inc: Fix same test case as above.
Math::BigRat::bmodinv() only handles integers, and is essentially just a
front-end to Math::BigInt::bmodinv().
|
|
|
|
|
|
|
| |
The tempdir() function has the rather confusing default of *not* cleaning up
("because of issues with backwards compatibility") so one needs the CLEANUP
flag. (The analogous newdir() method in the OO interface doesn't suffer this
gotcha.)
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why: The Math::BigFloat->bcmp() method returns the wrong result when the
exponent is too large to be represented exactly as a Perl numerical
scalar. In such cases, bcmp() returns 0 because it fails to distinguish
between the two exponents.
How: With this fix, bcmp() does not convert the exponents to Perl
numerical scalars, but keeps them as arbitrary precision integers, thus
returning the correct result regardsless of the number of digits in the
exponent.
Test: Two tests added. These tests fail with the old code.
Files:
- lib/Math/BigFloat.pm: New version of bcmp().
- t/bigfltpm.inc: Add two tests confirming desired behaviour.
- t/bare_mbf.t: Increment test count.
- t/bigfltpm.t: Increment test count.
- t/sub_mbf.t: Increment test count.
- t/with_sub.t Increment test count.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Why: Math::BigInt::Calc->_num() converts a big integer (in the internal
format) to a Perl scalar. If the big integer is too large to be
represented as a Perl scalar, it might return a Perl scalar numeric
"nan", rather than "inf". The reason is that the current algorithm might
multiply "inf" by "0", giving a "nan" which propagates. The following
example illustrates the bug:
perl -MMath::BigInt=lib,Calc -wle \
'print Math::BigInt->new("1e999999")->numify()'
How: This fix computes the output in a different way, never multiply
"inf" by "0".
Test: It is not obvious to me how to test this automatically in a
portable way, since Perl has no standard way of stringifying a scalar
numeric infinity. However the desired behaviour is verified manually and
no existing tests fail with the new code.
|
|
|
|
| |
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
|
|
|
| |
Signed-off-by: Chris 'BinGOs' Williams <chris@bingosnet.co.uk>
|
| |
|
|
|
|
|
| |
Core-only modules that have changed from v5.13.7, and dual-life modules
that have changed from v5.13.7 and didn't show up in earlier passes.
|
| |
|
| |
|
| |
|
|
|
|
|
| |
All files have been modified more recently than their tag, rendering
information in the tag redundant.
|
|
|
|
|
| |
This is necessary so the CPAN version can fix the INSTALLDIRS parameter it uses
on older perls.
|
|
|
|
|
| |
This is necessary so the CPAN version can fix the INSTALLDIRS parameter it uses
on older perls.
|
|
|
|
|
| |
This is necessary so the CPAN version can fix the INSTALLDIRS parameter it uses
on older perls.
|
|
|
|
|
|
| |
ExtUtils::CBuilder now has blead as its upstream repository. The
distribution has been moved to the dist/ directory consistent with
this change.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Trivial changes to fix warnings of types
* unclear precedence
* assignment as conditional
* signed/unsigned mixing
* unused parameter/variable
* value computed not used
* wrong argument type for a printf format
* variable may be used uninitialised (due to unhandled switch case)
|
| |
|
|
|
|
|
| |
This is necessary because the CPAN version required its SelfLoader dependency to
be bumped to a version that didn't swallow text after __END__.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Originally Storable didn't use any test modules, and had an ok subroutine in
t/st-dump.pl. Subsequently some tests were made conditional on Test::More
loading, and more recently the distribution started bundling Test::More, at
which point newer tests were written to use it. However, the older tests have
never been refactored to use it. Hence refactor tests to use Test::More, and
delete the now-unused test functions from t/st-dump.pl
Tested on blead and 5.004.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
The "safety margin" of 4 has been used up, now that Storable 2.25 can read
v2.8 files, but only writes out v2.4 on 5.004. All tests now pass on 5.004
(albeit with a bunch of warnings about ambiguous use of barewords, which are
no longer warnings).
Also, update $Test::Builder::Level to make diagnosing failing tests easier.
|
|
|
|
| |
This makes it fractionally shorter, and restores all compatibility with 5.004
|
|
|
|
|
|
|
|
| |
cbc736f3c4431a04 refactored Storable::{net_,}pstore to simplify the logic in
their caller, Storable::_store(). However, it introduced a bug, by assigning
the result of do_store() to a location on the Perl stack, which fails if the
Perl stack moves, because it was reallocated. Fix this assumption, and add a
test which causes the Perl stack to expand during the call to do_store().
|
|
|
|
|
|
| |
These tests have never been "live", having been added, commented out, in 2004
as part of 754c00caaffe2ec6. The trick to make them work is to delete from the
symbol table, rather than merely attempting to undefine the subroutine.
|
| |
|
|
|
|
| |
The change for storing UTF-8 coderefs necessitates this change.
|