summaryrefslogtreecommitdiff
path: root/t/mbi_ltm_latest.t
blob: d132f4a8392cb3219df6c7a146438cc91c7a4329 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
use strict;
use warnings;
use Test::More;

BEGIN {
  plan skip_all => "requires Math::BigInt 1.999837+" unless eval { require Math::BigInt && eval($Math::BigInt::VERSION) >= 1.999837 };
  plan tests => 3;
}

use Math::BigFloat only => 'LTM';
use Math::BigInt only => 'LTM';

my ($x, $y);

### https://github.com/DCIT/perl-CryptX/issues/82

$x = Math::BigFloat->new("0");
$y = Math::BigFloat->new("20");
$x->bcos($y);
is($x, "1.0000000000000000000");
$x = Math::BigFloat->new("0");
$y = Math::BigFloat->new("20");
$x->bcos($y);
is($x, "1.0000000000000000000");
$x = Math::BigFloat->blog(Math::BigInt->new(100),10);
is($x, "2");

### unsolved part of https://github.com/DCIT/perl-CryptX/issues/82
## 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.
## 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.
## 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.
## 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.
#
#&bone
#...
#-0::1
#--2::1
#-abc::1
#-2:abc:1