fix #82 new t/mbi_ltm_big*.t failures
Karel Miko
1 year, 8 months ago
6 | 6 |
|
7 | 7 |
BEGIN {
|
8 | 8 |
plan skip_all => "requires Math::BigFloat 1.999827+" unless eval { require Math::BigFloat && eval($Math::BigFloat::VERSION) >= 1.999827 };
|
9 | |
plan tests => 2403 # tests in require'd file
|
|
9 |
plan tests => 2391 # tests in require'd file
|
10 | 10 |
+ 5; # tests in this file
|
11 | 11 |
}
|
12 | 12 |
|
15 | 15 |
|
16 | 16 |
BEGIN {
|
17 | 17 |
plan skip_all => "requires Math::BigInt 1.9997+" unless eval { require Math::BigInt && eval($Math::BigInt::VERSION) >= 1.9997 };
|
18 | |
plan tests => 71;
|
|
18 |
plan tests => 70;
|
19 | 19 |
}
|
20 | 20 |
|
21 | 21 |
use Math::BigFloat only => 'LTM';
|
|
118 | 118 |
is ($cl->new('1.2')->bpow('0.3',10), '1.056219968');
|
119 | 119 |
is ($cl->new('10')->bpow('0.6',10), '3.981071706');
|
120 | 120 |
|
121 | |
# blog should handle bigint input
|
122 | |
is (Math::BigFloat::blog(Math::BigInt->new(100),10), 2, "blog(100)");
|
123 | |
|
124 | 121 |
#############################################################################
|
125 | 122 |
# some integer results
|
126 | 123 |
is ($cl->new(2)->bpow(32)->blog(2), '32', "2 ** 32");
|
|
0 |
use strict;
|
|
1 |
use warnings;
|
|
2 |
use Test::More;
|
|
3 |
|
|
4 |
BEGIN {
|
|
5 |
plan skip_all => "requires Math::BigInt 1.999837+" unless eval { require Math::BigInt && eval($Math::BigInt::VERSION) >= 1.999837 };
|
|
6 |
plan tests => 3;
|
|
7 |
}
|
|
8 |
|
|
9 |
use Math::BigFloat only => 'LTM';
|
|
10 |
use Math::BigInt only => 'LTM';
|
|
11 |
|
|
12 |
my ($x, $y);
|
|
13 |
|
|
14 |
### https://github.com/DCIT/perl-CryptX/issues/82
|
|
15 |
|
|
16 |
$x = Math::BigFloat->new("0");
|
|
17 |
$y = Math::BigFloat->new("20");
|
|
18 |
$x->bcos($y);
|
|
19 |
is($x, "1.0000000000000000000");
|
|
20 |
$x = Math::BigFloat->new("0");
|
|
21 |
$y = Math::BigFloat->new("20");
|
|
22 |
$x->bcos($y);
|
|
23 |
is($x, "1.0000000000000000000");
|
|
24 |
$x = Math::BigFloat->blog(Math::BigInt->new(100),10);
|
|
25 |
is($x, "2");
|
|
26 |
|
|
27 |
### unsolved part of https://github.com/DCIT/perl-CryptX/issues/82
|
|
28 |
## t/mbi_ltm_bigfltpm.t ................ 123/2408 Argument "" isn't numeric in subtraction (-) at /home/jkeenan/testing/v5.36.0/lib/perl5/site_perl/5.36.0/Math/BigFloat.pm line 4651, <DATA> line 330.
|
|
29 |
## Argument "" isn't numeric in subtraction (-) at /home/jkeenan/testing/v5.36.0/lib/perl5/site_perl/5.36.0/Math/BigFloat.pm line 4651, <DATA> line 331.
|
|
30 |
## Argument "" isn't numeric in subtraction (-) at /home/jkeenan/testing/v5.36.0/lib/perl5/site_perl/5.36.0/Math/BigFloat.pm line 4651, <DATA> line 332.
|
|
31 |
## Argument "abc" isn't numeric in subtraction (-) at /home/jkeenan/testing/v5.36.0/lib/perl5/site_perl/5.36.0/Math/BigFloat.pm line 4651, <DATA> line 333.
|
|
32 |
#
|
|
33 |
#&bone
|
|
34 |
#...
|
|
35 |
#-0::1
|
|
36 |
#--2::1
|
|
37 |
#-abc::1
|
|
38 |
#-2:abc:1
|