File: mbi_ltm_since_1.999837.t

package info (click to toggle)
libcryptx-perl 0.087-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 10,212 kB
  • sloc: ansic: 59,240; perl: 3,828; pascal: 2,612; makefile: 201
file content (39 lines) | stat: -rw-r--r-- 1,405 bytes parent folder | download | duplicates (3)
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