This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Upgrade to Math::BigInt 1.77
[perl5.git] / lib / Math / BigInt / t / bigintpm.inc
index 6453879..e842a2a 100644 (file)
@@ -778,7 +778,7 @@ inf:inf:NaN
 -inf:1
 NaNneg:0
 &is_positive
-0:1
+0:0
 -1:0
 1:1
 +inf:1
@@ -1497,6 +1497,29 @@ inf:0:inf,inf
 1234567890999999999:9876543210:124999998,9503086419
 1234567890000000000:9876543210:124999998,8503086420
 96969696969696969696969696969678787878626262626262626262626262:484848484848484848484848486666666666666689898989898989898989:199,484848484848484848484848123012121211954972727272727272727451
+# bug in v1.76
+1267650600228229401496703205375:1267650600228229401496703205376:0,1267650600228229401496703205375
+# excercise shortcut for numbers of the same length in div
+999999999999999999999999999999999:999999999999999999999999999999999:1,0
+999999999999999999999999999999999:888888888888888888888888888888888:1,111111111111111111111111111111111
+999999999999999999999999999999999:777777777777777777777777777777777:1,222222222222222222222222222222222
+999999999999999999999999999999999:666666666666666666666666666666666:1,333333333333333333333333333333333
+999999999999999999999999999999999:555555555555555555555555555555555:1,444444444444444444444444444444444
+999999999999999999999999999999999:444444444444444444444444444444444:2,111111111111111111111111111111111
+999999999999999999999999999999999:333333333333333333333333333333333:3,0
+999999999999999999999999999999999:222222222222222222222222222222222:4,111111111111111111111111111111111
+999999999999999999999999999999999:111111111111111111111111111111111:9,0
+9999999_9999999_9999999_9999999:3333333_3333333_3333333_3333333:3,0
+9999999_9999999_9999999_9999999:3333333_0000000_0000000_0000000:3,999999999999999999999
+9999999_9999999_9999999_9999999:3000000_0000000_0000000_0000000:3,999999999999999999999999999
+9999999_9999999_9999999_9999999:2000000_0000000_0000000_0000000:4,1999999999999999999999999999
+9999999_9999999_9999999_9999999:1000000_0000000_0000000_0000000:9,999999999999999999999999999
+9999999_9999999_9999999_9999999:100000_0000000_0000000_0000000:99,99999999999999999999999999
+9999999_9999999_9999999_9999999:10000_0000000_0000000_0000000:999,9999999999999999999999999
+9999999_9999999_9999999_9999999:1000_0000000_0000000_0000000:9999,999999999999999999999999
+9999999_9999999_9999999_9999999:100_0000000_0000000_0000000:99999,99999999999999999999999
+9999999_9999999_9999999_9999999:10_0000000_0000000_0000000:999999,9999999999999999999999
+9999999_9999999_9999999_9999999:1_0000000_0000000_0000000:9999999,999999999999999999999
 &bdiv
 abc:abc:NaN
 abc:1:NaN
@@ -1591,6 +1614,29 @@ inf:0:inf
 84696969696969696943434343434871161616161616161452525252486813131313131313143230042929292929292930:13131313131313131313131313131394949494949494949494949494943535353535353535353535:6449999999999999998
 84696969696969696969696969697497424242424242424242424242385803030303030303030300750000000000000000:13131313131313131313131313131394949494949494949494949494943535353535353535353535:6450000000000000000
 84696969696969696930303030303558030303030303030057575757537318181818181818199694689393939393939395:13131313131313131313131313131394949494949494949494949494943535353535353535353535:6449999999999999997
+# excercise shortcut for numbers of the same length in div
+999999999999999999999999999999999:999999999999999999999999999999999:1
+999999999999999999999999999999999:888888888888888888888888888888888:1
+999999999999999999999999999999999:777777777777777777777777777777777:1
+999999999999999999999999999999999:666666666666666666666666666666666:1
+999999999999999999999999999999999:555555555555555555555555555555555:1
+999999999999999999999999999999999:444444444444444444444444444444444:2
+999999999999999999999999999999999:333333333333333333333333333333333:3
+999999999999999999999999999999999:222222222222222222222222222222222:4
+999999999999999999999999999999999:111111111111111111111111111111111:9
+9999999_9999999_9999999_9999999:3333333_3333333_3333333_3333333:3
+9999999_9999999_9999999_9999999:3333333_0000000_0000000_0000000:3
+9999999_9999999_9999999_9999999:3000000_0000000_0000000_0000000:3
+9999999_9999999_9999999_9999999:2000000_0000000_0000000_0000000:4
+9999999_9999999_9999999_9999999:1000000_0000000_0000000_0000000:9
+9999999_9999999_9999999_9999999:100000_0000000_0000000_0000000:99
+9999999_9999999_9999999_9999999:10000_0000000_0000000_0000000:999
+9999999_9999999_9999999_9999999:1000_0000000_0000000_0000000:9999
+9999999_9999999_9999999_9999999:100_0000000_0000000_0000000:99999
+9999999_9999999_9999999_9999999:10_0000000_0000000_0000000:999999
+9999999_9999999_9999999_9999999:1_0000000_0000000_0000000:9999999
+# bug with shortcut in Calc 0.44
+949418181818187070707070707070707070:181818181853535353535353535353535353:5
 &bmodinv
 # format: number:modulus:result
 # bmodinv Data errors