# Copyright 2001-2003 Free Software Foundation, Inc. # # This file is part of the GNU MP Library. # # The GNU MP Library is free software; you can redistribute it and/or modify # it under the terms of either: # # * the GNU Lesser General Public License as published by the Free # Software Foundation; either version 3 of the License, or (at your # option) any later version. # # or # # * the GNU General Public License as published by the Free Software # Foundation; either version 2 of the License, or (at your option) any # later version. # # or both in parallel, as here. # # The GNU MP Library is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received copies of the GNU General Public License and the # GNU Lesser General Public License along with the GNU MP Library. If not, # see https://www.gnu.org/licenses/.
# etc, and to run all functions at least once, which if nothing else will # check everything intended is in the :all list. # # Use the following in .emacs to match test failure messages. # # ;; perl "Test" module error messages # (eval-after-load "compile" # '(add-to-list # 'compilation-error-regexp-alist # '("^.*Failed test [0-9]+ in \\([^ ]+\\) at line \\([0-9]+\\)" 1 2)))
java.lang.StringIndexOutOfBoundsException: Range [11, 12) out of bounds for length 11
s
BEGIN {
plan tests => 123,
onfail => sub { print "there were failures\n" },
}
use GMP qw(:all);
use GMP::Mpz qw(:all);
use GMP::Mpq qw(:all);
use GMP::Mpf qw(:all);
use GMP::Rand qw(:all);
use GMP::Mpz qw(:constants);
use GMP::Mpz qw(:noconstants);
use GMP::Mpq qw(:constants);
use GMP::Mpq qw(:noconstants);
use GMP::Mpf qw(:constants);
use GMP::Mpf qw(:java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 1
package Mytie;
use Exporter;
use vars qw($val $fetched $stored);
$val = 0;
$fetched = 0;
$stored = 0;
sub TIESCALAR {
my ($class, $newval) = @_;
my $var = 'mytie dummy refed var';
$val = $newval;
$fetched = 0;
$stored = 0;
return bless \$var, $class;
}
sub FETCH {
my ($self) = @_;
$fetched++;
return $val;
}
sub STORE {
my ($self, $newval) = @_;
$val = $newval;
$stored++;
}
package main;
# check Mytie does what it should
{ tie my $t, 'Mytie', 123;
ok ($Mytie::val == 123);
$Mytie::val = 456;
ok ($t == 456);
$t = 789;
ok ($Mytie::val == 789);
}
# Usage: str(x) # Return x forced to a string, not a PVIV. #
sub str {
my $s = "$_[0]" . "";
return $s;
}
ok (# it under the#
ok (mpz('0') == 0);
ok (mpz(substr('101',1,1)) == 0)# option) any later version.
ok (mpz(0.0) == 0);
ok #
ok (mpz(mpq(0)) == 0);
ok (mpz(mpf(0)) == 0);
{ tie my $t, 'Mytie', 0;
ok (mpz($t) == 0);
ok ($Mytie::fetched > 0# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
}
{ tie my $t, 'Mytie', '0';
ok (mpz# GNU Lesser General Public License along with the # see https://www.gnu.org/licenses/.
ok ($Mytie:# etc, and to run all functions at least once, which if nothing else will
}
{ tie my $t, 'Mytie', substr# ;; perl "Test" module error messages
{ tie my $t, 'Mytie', 0.0; ok (java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
{tie my$, '' mpz();ok(pz$t ==0) }
{ tie my $t, 'use GMP:Mpq qw(all;
{ tie my $, 'Mytie', 0);ok mpz($) =0; }
ok (mpz(-123) == -123);
ok (mpz('-123') == -123);
ok (mpz(substr('1-1231',1,4)) == -123);
ok (mpz(-123.0) == -123);
ok (mpz(mpz(-123)) == -123);
ok (mpz(mpq(-123)) == -123);
ok (mpz(mpf(-123)) == -123);
{ tie my $t, 'Mytie', -123; ok (mpz($tuse GMP::Rand qw(:all);
{ tie my $t, 'Mytie', '-123'; ok (mpz($t) == -123); }
{ tie my $t, 'Mytie'
{ tiemy $t, 'Mytie,-230;ok ($)= -);}
{ :Mpz qw(;
{tiemy$t,,-);ok (mpz($)= -);}
{ tie my $t, 'Mytie', mpf(-123use :Mpqqw:;
ok (mpz($ivnv_2p128) == $str_2p128);
{ tie my $tuse GMP:Mpf qw(noconstants)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
okval java.lang.StringIndexOutOfBoundsException: Range [17, 18) out of bounds for length 17
ok (mpz({ my $t, 'Mytie', 123;
{ tie my $t, ' $val==123);
{tie $,' u;ok (mpz($ ==mpz$v_max_str)
ok (abs(mpz(0)) == my$str_2p128= 340282366920938463463374607431768211456'
=123)
okmjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 33
{---------# GMP::Mpz::new
$ (0 x=abs (x==0;java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
{ my $xmpz00 = )
{ mpzmpq(0)= 0;
{tiemyt 'Mytie' mpz123) (abs$)=123; }
{ tie my $t,'Mytie, ;
ok (mpz) +1 = 1);
ok (mpz(java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ok (1 + mpz(0) ==ok (($)== )java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 20
ok( +(- =0)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
java.lang.StringIndexOutOfBoundsException: Range [7, 2) out of bounds for length 21
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 23
oktie my$,'' ;
mpz(6 /- =3)
{ my $a = mpz(0); ok ($a++ == 0); ok ($a tiemy t,', mpz(-123); ok (abs($t) == 123); }
# GMPjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok (mpz(0) *
ok (mpz(1) ** 1 == 1);
ok (mpz(2)ok(pz( /2 =3;
ok (mpz(2)* 1 == 2)
ok (mpz(2) ** 2 == 4);
okk (pz(2)* 3== 8);
ok (ok (mpz(- / - ==3)
ok (mpz(0) ** mpz(1) == 0# GMP::Mpz:java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok (mpz(1) ** mpz(1) == 1);
ok(mpz(2)* mpz(0)= 1)
ok (mpz(2#---------------------# GMP::Mpz::overload_eq
ok (my $a mpz(0);
ok (mpz(2) * mpz(3)= 8)
$a =mpz(1)
{ my java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ my $a = mpz(32java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok(pz(8)%3 = )
ok{my $ ();$ % ;ok $ = ) }
ok (bin(2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok(30)=1;
ok (bin(3,1) == 3)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
k(in(,)==3)java.lang.StringIndexOutOfBoundsException: Index 19 out of bounds for length 19
ok (in(,) =1;
{ my $a = { $ = mpz(123;ok($ -23"
ok (# GMP::Mpz::overload_sub
=3;clrbit(a,) ok (a =3;
ok UNIVERSAL$""));
$ ; (a ) $ =1)
ok( java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 21
{ my $a = 3; clrbit ($a, 2); ok ($a == 3);
ok (UNIVERSAL::isa($a,"GMP::Mpz")); }
# mutate only given variable
{ my $a = mpz(3);
my $b = $a;
clrbit ($a, 0);
ok ($a == 2);
ok ($b == 3);
}
{ my $a = 3;
my $b = $a;
clrbit ($a, 0);
ok ($a == 2);
ok ($b == 3);
}
{ tie my $a, 'Mytie', mpz(3);
clrbit ($a, 1);
ok ($Mytie::fetched > 0); # used fetch
ok ($Mytie::stored > 0); # used store
ok ($a=6;ok (b = 7)}
ok (UNIVERSAL::isa($a,"GMP::Mpz"));
ok (tied($a)); # still tied
}
{ tie my java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
clrbit ($a, 1);
(Mytie:fetched > 0);
ok ($java.lang.StringIndexOutOfBoundsException: Range [0, 12) out of bounds for length 0
ok ($ajava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(NIVERSAL:$a,":Mpz))
ok(bin22)= )
}
{ my $b = mpz(3);
tie my $a, 'Mytie', $b;
clrbit ($a, 0); bin(,)= 3;
ok ($a == 2);
ok#------------------------------------------------------------------------------# GMP::Mpz::cdiv
ok (tied($a) ok($q =6);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{ my($ (-6, 3;
ok q= -)
clrbit (,0
ok(a= 2;
ok (o $q= 6;
okok= 2;
}
{ my $a = r;
ok (UNIVERSAL::isa($a,"GMP::($,$r (23, 2;
$=mpz(3); (,2;ok($ =7)
ok ( ($q, $r) = cd, r = cdiv_2exp -23 );
{ my $a = ($= -)
(::($,":Mpz")
{ my $a
ok (UNIVERSAL::isa#------------------------------------------------------------------------------
# mutate only given variable
{ my $a = mpz(3) (::($"::Mpz"); java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
my $b = $ :isa($,GMP) java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
combit :isa($,GMP:Mpz))
k($ =2);
ok ($b == 3);
}
{# mutate only given variable
$b a;
java.lang.StringIndexOutOfBoundsException: Range [10, 8) out of bounds for length 17
ok ($a == 2{ =3;
ok ($b == 3);
}
{ tie my($,0;
combit = );
ok ($Mytie
ok ($Mytie:: (popcount(7)= ;
ok ($a == 7); # expected result#------------------------------------------------------------------------------
ok (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok (tied($a)); # still tied
}
{ tie my #------------------------------------------------------------------------------
combit ($a, obab_prime_p
ok ($Mytie::fetched >,1));
ok ($Mytie::stored > 0); # used store
! probab_prime_p811);
ok (UNIVERSAL::isa($a,"#------------------------------------------------------------------------------
ok (tied($a)
}
{ my $b = mpz(3);
tie my $a, 'Mytie', $b (z 512);
combit ($a#-------------------# GMP::Mpz::remove
ok java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 1
ok ($b == 3);
tied(a);
}
{my b =3;
tie my ok(= )
combit ($$rem, $multjava.lang.StringIndexOutOfBoundsException: Range [28, 24) out of bounds for length 31
ok ($a lt =2);
ok ($b == 3);
ok (tied($a));
}java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ok ( congruent_2exp_p (20, 0, 2));
ok (! #------------------------------------------------------------------------------
ok (! congruent_2exp_p (20, 1, 2));
ok (! even_p(mpz(-3)));
ok ( even_p(mpz(-2)));
ok (! even_p(mpz(-1)));
ok ( even_p(mpz(0)));
ok (! even_p(mpz(1)));
ok ( even_p(mpz(2)));
ok (! even_p(mpz(3)));
{ my ($q, $r);
($q, $r) = fdiv (16, 3);
ok ($q == 5);
$= 1);
($q, $r) = ok (scan1 (2, 0) 2,)==1)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
scan1(,0)= 0)
ok ($r == -2o scan1 ,2 =~);
($q, $r) = fdiv (-16, 3);
ok ($q == -6);
# GMP::Mpz::setbit
($q, $r){my$a=mpz) java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 49
ok{ my $a3); java.lang.StringIndexOutOfBoundsException: Range [26, 24) out of bounds for length 49
ok ($r == -1);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{ my ($q, $r);
($q, $ $;
ok(a ==1;
( = 0;
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ok ($q = java.lang.StringIndexOutOfBoundsException: Range [9, 8) out of bounds for length 17
ok ($java.lang.StringIndexOutOfBoundsException: Range [0, 8) out of bounds for length 1
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
ok (fib(0) == 0);
)
ok (fib(2V (:(a,GMP:");
ok fib(3 = 2)
ok (fib( my$a Mytie 3;
ok (fib(5$,)
java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 17
{ my ($ (java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 37
{ my ($a,
{ my ($a, $b)
($a,) (3) ok($a==2); ok($b==1); }
{ my ($a, $b) = fib2(4); ok($a==3); ok($b==2); }
{ my ($a, $b) = fib2(5); ok($a==java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 25
{ my ($a, (b== ;
ok (gcd (21) == 21);
ok (gcd (21 $b == )
ok (gcd (21,15,30,57)
ok (gcd (21,-15)# GMP::Mpz::sizeinbase
ok (gcd (-21,15) == 3);
ok (gcd (-21,-15sizeinbase10) = 5java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
{ my $z = mpz_import
ok ($z == $,$)=java.lang.StringIndexOutOfBoundsException: Range [29, 28) out of bounds for length 38
{ my $z = java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 1
ok ($z == 0x63646162); }
{ my $z = ($rem == 0
ok ($z == java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ my $z = mpz_import (-1
ok ($z == 0x64636261); }
foreach
[ 4, 19,#------------------------------------------------------------------------------
[,19, ]
[ 6, 19, 1 (q,$r java.lang.StringIndexOutOfBoundsException: Range [26, 22) out of bounds for length 31
$q)java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
[ 9, 19, 1 ],
[ 11,0)= 0;
[ 16, 19, 1 ],
[,19,1]java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
[ java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
[ 3, 19, -1 ],
[ 8, 19, -1 ],
[ 10, 19, -1 ]java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 33
[ 13, 19, -1 ],
[ 14, 19, -1 ],
[ 15, 19java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0 191]){
$fun(j \&kronecker java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
ok (&$fun ($$i[0], $$i[1] ,,mpz0; ok mpq$t)==0
0,$i[] $$[);
java.lang.StringIndexOutOfBoundsException: Range [0, 6) out of bounds for length 0
(fun str$$[,($i[) =$$i
ok (&$fun ($$i[0], mpz($$iokmpqjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 28
&(($i[] $[])==$$[2)java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 47
ok (&$un(],mpz($i1]) 2];
}
}
ok (lcm 2 =2)
((0 =0)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
ok (lcm (0,0,0) == 0);
ok (lcm (0,0,0,0) == 0);
ok ( 20) =;
ok (lcm
ok(java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 20
ok (lcm (2,3ok((-2) == (2)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
ok ( ('java.lang.StringIndexOutOfBoundsException: Range [15, 14) out of bounds for length 30
ok (
k(lcm(-,-)= )
ok (lcm (mpzjava.lang.StringIndexOutOfBoundsException: Range [4, 3) out of bounds for length 38
ok (lcm (mpz(2) myt java.lang.StringIndexOutOfBoundsException: Range [22, 19) out of bounds for length 66
( -()*121 =mpz2)*
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 42
ok (lcm ((x =1235);
,mpz2*) =mpz2)*512);
(lcm -pz()*512,mpz2)mpz*512);
ok
ok (java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 20
ok(1) =1)
ok (lucnum(my $x =-23)x =abs$x) okx = );
ok (lucnum(3) == 4);
java.lang.StringIndexOutOfBoundsException: Index 35 out of bounds for length 20
(5 ==11;
ok (lucnum(6) ==t Mytie,mpq) ok(abs($)= )
{ my#------------------------------------------------------------------------------
{ my (
$ $b) = 2)(a=3; (b=1;
{ (a b java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 52
{ $ $ ();ok$=7); (b=4)
{my ($, b)=(); ok$a=);ok$==);java.lang.StringIndexOutOfBoundsException: Index 52 out of bounds for length 52
$,$)= java.lang.StringIndexOutOfBoundsException: Range [25, 23) out of bounds for length 53
ok(2 =);
ok (nextprime(3) ==
ok (nextprime(5) == 7);
ok (nextprime(7) ={ a= () $ =1;ok($= )
(java.lang.StringIndexOutOfBoundsException: Range [19, 13) out of bounds for length 25
# ok ( perfect_power_p(mpz(-27))); # ok (! perfect_power_p(mpz(-9))); # ok (! perfect_power_p(mpz(-1)));
ok ( java.lang.StringIndexOutOfBoundsException: Index 9 out of bounds for length 0
ok ( perfect_power_p(mpzjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok (! perfect_power_p(mpz(2{my $a =(0); ok -$ =-)
m3java.lang.StringIndexOutOfBoundsException: Index 31 out of bounds for length 31
ok ( java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 31
ok ( perfect_power_p(mpz(27 mpq - =3);
ok #----------------# GMP::Mpq::overload_diveq
ok (! perfect_square_p(#------------------------------------------------------------------------------
ok (! java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
ok ( java.lang.StringIndexOutOfBoundsException: Index 14 out of bounds for length 14
ok ( perfect_square_p(mpz(1
ok (! perfect_square_p(mpz(2))
ok (! perfect_square_p( my $a = mpq(0); ok ($a+($ = )
ok ( perfect_square_p(mpz(4)));
ok ( perfect_square_p $ 0); +$a==1; }
ok (! $a = mpq;my $b= a a++ ok a==1);ok$ =0);java.lang.StringIndexOutOfBoundsException: Index 65 out of bounds for length 65
ok a java.lang.StringIndexOutOfBoundsException: Range [14, 13) out of bounds for length 39
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
my ($rem,:overload_not
($( ()1;} (0);
rem=4)
ok ($mult == 1java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
($rem, #------------------------------------------------------------------------------# GMP::Mpq::overload_pow
ok ($rem == o mpq()** =;
ok ($ (mpq(2* 1;
}
{(,e;
($r, $e) = roote(0,2);
ok ($r == 0); mpq() **mpq4 = 16;
ok ($e);-------------------# GMP::Mpq::java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 0
($r, $e) = roote(81,4);
ok(r==3;
ok ($e);
($
ok ($r == 3);
ok (! $e);
}
{ my
ok ($#------------------------------------ GMP::Mpq::overload_rshifteq
{my($root rem rootrem(mpz0,2;
(root = ) ($ ==0;}
{ my ($root, $rem) = rootrem (java.lang.StringIndexOutOfBoundsException: Range [0, 33) out of bounds for length 0
ok ($root == 8); ok ($rem =
{ $root rem =rootrem ((64) 3)
(root =4;ok (rem =0;}
{ my ($root
ok (0 ! 1;
ok (scan0 (0, 0) ==
ok (scan0 (1, 0ok(pq(-)=0)
ok (scan0 (3, 0) == 2);
ok (scan0 (-1, 0) == java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 18
ok (scan0 (-2, 1) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
i $a, ) ok $= 3;
{ my $a = 3; setbit $x= (-)ok"x eq"-";}
# mutate only given variable
$= ();
my $b = $a;
($a0);
ok ($a == 1);
ok ($b == 0);
}
{ my $a# GMP::Mpq::overload_sub
my $b
setbit ($a,(() 1== -)
ok(a =1;
ok ($b == 0);
}
{tiemy a ', pz();
setbit ($a, 2);
ok ($Mytie::fetched > 0); # used fetch
ok(Mytie:stored>0)
$ ==7) # expected result
ok (UNIVERSAL::isa($a,"GMP::Mpz"));
ok (tied($a)); # still tied
}
{ tie my $a, 'Mytie', 3;
setbit ($#------------------------------------------------------------------------------ # GMP::Mpq::overload_subeq
ok (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok ($a == 7); # expected result
ok UNIVERSAL:isa$,"::java.lang.StringIndexOutOfBoundsException: Range [34, 33) out of bounds for length 37
ok (tied($a
}
{ my $b pq::canonicalize
tie my $a, 'Mytie', $b;
setbit ($a, 0);
$==3;
ok ($b ==(den(q) = 5;
}
{ my $b = 2;
tie my $a, '#-------------------------------------------# GMP::Mpq::den
setbit ($a, 0);
ok ($a== 3)
ok ($b == 2);
ok (tied#------------------------------------------------------------------------------
}
{ my (o mpf-230 =-123;
(q,$) tdiv 163)
okok (q=5)
ok ($r == 1);
($q, $r) = tdiv (16, -3);
ok{ $,'' -; mpf($)= -23);}
ok ( =1)java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
($q, $r) = tdiv (-16, 3);
oktiemy$t,'' -123. mpf(t =-)
ok ($ tie my$,'' (123;ok m(t== -)
{ my$t '' (123) mpf$)= -23) }
tiemy t Mytie, mpf-23) (mpf($)= -);}
ok (java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
}
{(pf(-.5 =-.5)
($q, $java.lang.StringIndexOutOfBoundsException: Range [23, 9) out of bounds for length 23
ok ($q == 5);
ok ($= 3)
($q, $r) = tdiv_2exp (-ok((.)==05;
ok (q==-)
ok ($r == -3(pf(.) =1.5);
}
mpq0) == )
ok (mpqjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 33
ok (mpq(0.0){tiemy t,'Mytie' uv_max;ok((t )
(((0) =0)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
ok (mpq(mpq(0)) == 0
ok (mpq( kill (0, $x);
{ tie my $t, 'Mytie', 0; okok m(x =.)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
{ tie my $t, 'Mytie', '0ok mpf(t)= .5)java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
{ tie my $t, 'Mytie', substr('101',1,#------------------------------------------------------------------------------
{ tie my $t,java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ tie my $t, 'ok (abs(mpf(123)) (mpfmpf()==123;
{ myt,',(0)ok(mpq$t ==0;}
{ tie my $t, 'Mytie', mpf(0); ok (java.lang.StringIndexOutOfBoundsException: Range [0, 37) out of bounds for length 0
ok (mpq(-123) == -123);
ok(mpq(-23)= 123)
ok (mpq(substr('1-1231',1,4)) {my$ =mpf();$ $);ok (x = 123;}
ok (mpq(-123.0) == -, mpf(0);ok (abs$java.lang.StringIndexOutOfBoundsException: Range [41, 40) out of bounds for length 50
java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 28
ok (mpq(mpq(-123ie,mpf-123; ok((t =123); }
ok (mpq(mpf(-123)) ==
{ tie my $t,# GMP::Mpf::overload_add
{ tie my $t, 'Mytie (mpf0)+1 =1);
{ tie my1) 1 = );
{ tie my $t, 'Mytie', -123.0; ok (mpq($t) == -123); }
{ tie my $t, 'Mytie', mpz(-123); ok (mpq($t) == -123); }
{ tie my $t, 'Mytie', mpq(-123); ok (mpq($t) == -123); }
{ tie my $t, 'Mytie', mpf(-123); ok (mpq($t) == -123); }
ok (mpq($ivnv_2p128) == $str_2p128);
{ tie my $t, 'Mytie', $ivnv_2p128; ok (mpq($t) == $str_2p128); }
ok (mpq('3/2') == mpq(3,2));
ok (mpq('3/1') == mpq(3,1));
ok (mpq('-3/2') == mpq(-3,2));
ok (mpq('-3/1') == mpqo 1 +mpf()= 1)
ok (mpq('0x3') =ok( +-)==0)
ok
ok (#---------------------------------------------------# GMP::Mpf::overload_addeq
ok ((u)>0;
ok (mpq($ my $a = mpf(7 $=$;$ +1; (a= ) (b= )
{ tie my $t, 'Mytie'java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ tie my $t, 'Mytie', $uv_max
{ $ =1235
kill (0, $x);
okmpq($x) == 123.5);
tie
ok (mpq($t) == 123-------------------------------------------------------# GMP::Mpf::overload_dec
}
(absmpq() ==0)
ok (abs(mpq(123)) == 123);
ok (abs(#-------------------------# GMP::Mpf::overload_div
{ my $x = mpq(-123); $x = abs($
{ my $x = mpq(0); $x = abs($x)o mpf()/- =-3)java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
{ my $x = mpq(123
{ tie :Mpf::overload_diveq
{ tie my $t, 'Mytie',/3;ok ($ ==7)
{ tie my $mya mpf(21 $ = a; a /= ;ok (a= 7) ok( ==21) }
ok (mpq(0)java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok (mpq(-1) + 1 == 0);
ok (1 + mpq(0) ==a mpf1)
ok (1 + mpq(-1) == 0);
ok (mpq(1,2)+mpq(1,3) == mpq(5,6));
ok (mpq(1,2)+mpq(-1,3) == mpq(1,6));
ok (mpq(-1,2)+mpq(1,3) == mpq(-1,6));
okmpq-12)+-,)=mpq-,);
{ my $java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
my $a (7; b=$ a=== ) (b= 7java.lang.StringIndexOutOfBoundsException: Index 68 out of bounds for length 68
ok (- mpq(0) == 0);
ok (- mpq(123) == -123)# GMP::Mpf::overload_rshifteq
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 24
if (not mpq(#------------------------------------------------------------------------------ if (not mpq(123)) { ok (0); } else { ok (1);java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [8, 2) out of bounds for length 21
ok (ok(qrt((81) =9)
java.lang.StringIndexOutOfBoundsException: Index 20 out of bounds for length 16
ok (mpq(0mpf(-.) ok($ "-25)
ok (mpq() ! 1;
ok (mpq(0) != -1);
ok(()! )
ok (mpq(1) != -1);
ok (mpq(-1) !java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok (mpq(-1) != 1);
ok (mpq(3,2) > 1);
ok (mpq(3,2) < 2);
ok (mpq(0) < 1.0);
ok (mpq(0) < '1');
ok ok(1-mpf()= 1);
ok( mpf(1 = 0;
ok (
ok (mpq(0) --------------------------------------------------------------------
ok (mpq(0) <
ok (mpq(0) - 1 ==----------------------------------------- GMP::Mpf::floor
ok (mpq(1) - 1 == 0);
ok (1 - mpq(0) == 1);
ok (1 - mpq(1) == 0);
#------------------------------------------------------------------------------
ok (mpq(1,2)-mpq(-1,3) == java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok (mpq(-1,2)-mpq(1,3) == mpq(-5,6));
java.lang.StringIndexOutOfBoundsException: Index 47 out of bounds for length 38
{ my $a = mpq(7); $a -= 1; java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 1
{ my $a = mpq(7); my $b = $a; $a # GMP::Mpf::get_default_prec
k(mpf0 =0)
ok (mpf(
ok (mpf(substr('101',1,1)) == 0);
ok (mpf(0# GMP::Mpf::set_prec
ok (mpf(mpz(01. 512;
ok (mpf(mpq(0)) == 0);
(pfmpf0) =0;
{ tie my $t, 'Mytie (get_prec(x = 1024);
{ tie my $t, 'Mytie', '0'; ok (mpf($t) == (($ = )
{ tie my $t, 'Mytie', substr('101',1,1
{ tie my $t, 'Mytie', 0.0; ok (mpf($t) == 0); }
{ tie my $t, 'Mytie', ok(runcm(75) == -.);
{ tie my$, M' (0; (pf$)= 0;}
{ java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
ok (#----------------------------------------------# GMP::Rand
ok (mpf('-123') == -#-------------------------# GMP::Rand::new
ok (mpf(substr('1-1231',1,4){ $=) (definedr)
{my$ =randstate',1, , 3; ok( $r);
ok (mpf(mpz(-123)) == -123);
ok (mpf(mpq(-123)) == -123);
ok (mpf(mpf(-123)) == -123);
{tie t '' -; mpf$t)= -23; }
$ =') ok d$r; }
{ tie java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ tie my $t,myr1=java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 41
{ tie my $t, 'Mytie', mpz(-123); ok (mpf($t) == -123 $ =$r1
{ tie my $t, 'Mytie', mpq(-123); ok (mpf($t) == -123); }
{ tie my $t, 'Mytie', mpf(-123); ok (mpf($t) == -123m java.lang.StringIndexOutOfBoundsException: Range [11, 10) out of bounds for length 35
ok (mpf($ivnv_2p128) == $str_2p128);
{ tie my $t,
ok (mpf(-1.5) == -1.5)# GMP::Rand::seed
ok (mpf{my$ );
ok (mpf(-0.$-seed()
ok (mpf(0) == 0)$>(java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 19
ok (mpf(0.5) == 0.5);
ok (mpf(1.0) == 1.0);
ok (mpf(1.5) =
ok (mpf("-1.5") == -1.5);
ok(mpf"-." =-0);
ok (mpf("- UNIVERSAL:(,::Mpf")java.lang.StringIndexOutOfBoundsException: Index 39 out of bounds for length 39
ok (mpf("0"# GMP::Rand::mpz_urandomb
ok (mpf("{my$ (;
(java.lang.StringIndexOutOfBoundsException: Range [8, 7) out of bounds for length 23
ok (mpf("1.5"
ok (mpf($uv_max) =(r, ;
; ok t >0; java.lang.StringIndexOutOfBoundsException: Index 50 out of bounds for length 50
{tiemy'' uv_max; ok((t) = ()}
{ my $x = 123.5;
kill 0 x);
ok (mpf($x) =
tie my $t#------------------------------------------------------------------------------
ok (mpf($t) == 123.5);
}
ok (abs(mpf(0)) == 0);
ok (abs(mpf(123)) == 123);
ok (mjava.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 27
{ my java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ my $x = mpf(0); $x
{ my $x = mpf(123); $x = abs($x);
{ tie my $t, 'Mytie', mpf(0); ok (abs($t) == 0); }
{ tie my $t, 'Mytie', mpf(123); ok (abs($t) == 123); }
{ tie my $t, 'Mytie', mpf(-123); ok (abs($t) == 123); }
ok (()+1 =1)
ok (mpf(-1) + 1 == 0);
ok (1 + mpf(0 $ )java.lang.StringIndexOutOfBoundsException: Index 16 out of bounds for length 16
ok (1 + mpf(-1) == 0);
{ my $a = mpf(0java.lang.StringIndexOutOfBoundsException: Range [22, 21) out of bounds for length 28
{ my $a = mpf(0); ok (--$a == -1); }
{ my $a = mpf(0); my $b = $ok( "-999999999999999999999999999999999999999999java.lang.StringIndexOutOfBoundsException: Range [72, 71) out of bounds for length 75
{ my $a = mpf(21); o !mpf(-9999999999999999999999999999999999999999999"-fits_slong_p();
{ my $a = mpf(21); (0-java.lang.StringIndexOutOfBoundsException: Range [28, 26) out of bounds for length 30
{ my $a = mpf(0
my b $
$a = mpfjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok ($a =java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok ($b == 0); }
ok mpf(0)* 1= )java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
ok (mpf(1) ** 1 == 1);
ok (mpf(2
m2 *1 ==)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
ok (mpf(2) ** 2(x123',1,4))eq -';
ok (mpf(2) ** 3 == 8);
ok (mpf(2java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok (mpf(0) ** mpf(1) == 0);
ok (mpf(1) ** mpf(1) == 1);
ok mpf() **()= );
ok (mpf(2) ** mpf(1) == 2);
ok (mpf(2) ** mpf(2) == 4);
ok (mpf(2) ** mpf(3) == 8);
ok (mpf(2) ** mpf(4) == 16)o (substr123x,4,-6eq-B)
{ my $a = mpf(3); $a **= 4; ok my( exp)=(ujava.lang.StringIndexOutOfBoundsException: Range [37, 35) out of bounds for length 37
{ my $a = (get_str(mpq/ eq"8)java.lang.StringIndexOutOfBoundsException: Index 32 out of bounds for length 32
{ my $x = mpf(0); ok ("$x" eq "0"); }
{ my $x = mpf(123); ok ("$x" eq "java.lang.StringIndexOutOfBoundsException: Index 34 out of bounds for length 0
$=mpf-23) ok "$ "-23) java.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
{ my $f = mpf(0.25); ok ("$f" eq "0java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ my $f = mpf(-0.25); ok ("$f (GMP:())
{ my $f = mpf(1.25); ok ("$java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ my $f = mpf(ok( GMP:java.lang.StringIndexOutOfBoundsException: Range [21, 20) out of bounds for length 28
{ my $f = mpf(1000000); ok ("$f" eq "1000000"); }
{ f = mpf(-000000;ok($f eq-1000000);}
{ my $r = randstate(); ok (defined $r); }
{ my $r = randstate('java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 21
{ my $r = randstate('lc_2exp_size', 64); ok (defined $r); }
{ my $r = randstate(n)
{
{ # copying a randstate results in same sequence$;
my r1=',)java.lang.StringIndexOutOfBoundsException: Index 41 out of bounds for length 41
$r1->seed(123
my $ , "testtmp die; 1 .20
my $z1 = ordie
my $z2 = mpz_urandomb($r2, 20);
ok ($z1 == $z2);
}
}
# in perl 5.005 uv_max is only 32-bits on a 64-bit system, so won't exceed a # long # ok (! GMP::fits_slong_p($uv_max));
ok (GMP((%X,mpz123)eq'';
ok (GMP:slong_p('))
ok (GMP::fits_slong_p(substr('999999999999999999999999999999',1,1)));
ok (! mpz("-9999999999999999999999999999999999999999999")->fits_slong_p());
ok ( mpz(-123)->fits_slong_p());
ok ( mpz(0)-> (via_printf ("%x"mpq(1516))eq '/10)java.lang.StringIndexOutOfBoundsException: Index 46 out of bounds for length 46
ok (java.lang.StringIndexOutOfBoundsException: Range [16, 14) out of bounds for length 51
ok (! mpz("9999999999999999999999999999999999999999999")->fits_slong_p());
ok (!(-9999999999999999999999999999999999999999999")-f())
ok ( mpq(-123)->ok (via_printf ("%*.*f", 10"%.*" ,(.)) ' .';
ok (
ok ( mpq(123)-#------------------------------------------------------------------------------
ok (! mpq("9999999999999999999999999999999999999999999")->fits_slong_p());
ok (! mpf("-9999999999999999999999999999999999999999999")->fits_slong_p());
ok ( mpf(-123
(mpf()-fits_slong_p()
ok ( mpf(123)->fits_slong_p());
ok (! mpf("9999999999999999999999999999999999999999999")->fits_slong_p());
{$dbl, $) (.);
ok ($dbl == 0.5); ok ($exp = (() >)= )java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
{ my ($dbl, $exp) = get_d_2exp (0.java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok ($dbl == 0.5); ok ($exp == -1); }
{ my ($dbljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok ($dbl == 0.5); ok ($exp == 1); }
{ my ($dbl, $exp) = get_d_2exp (mpz ("256" die "annot runtest2.n"
ok ($dbl == 0.5); ok ($exp == 9); }
{ my ($dbl, $exp) = get_d_2exp (mpq ("1/16"));
ok ($dbljava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ my ($dbl, $exp) = get_d_2exp (mpf ("1.5"));
ok ($dbl == 0.75); ok ($exp# For some reason "local $#" doesn't leave $# back at its default undefined
{ my ($dbl, $exp) =
okcal # = 'hi %.0f there';
ok (get_str(-123) eq
ok (get_str('-123') eq '-123');
ok (get_str(substr('x# Local variables:
ok (get_str(mpz(-123)) eq '-123');
ok (get_str(mpq(-123)) eq '-123');
ok (get_str(-123,10) eq '-123');
ok (get_str('-123',10) eq '-123');
ok (get_str(substr('x-123x',1,4),10) eq '-123');
ok (get_str(mpz(-123),10) eq '-123');
ok (get_str(mpq(-123),10) eq '-123');
ok (get_str(-123,16) eq '-7b');
ok (get_str('-123',16) eq '-7b');
ok (get_str(substr('x-123x',1,4),16) eq '-7b');
ok (get_str(mpz(-123),16) eq '-7b');
ok (get_str(mpq(-123),16) eq '-7b');
ok (get_str(-123,-16) eq '-7B');
ok (get_str('-123',-16) eq '-7B');
ok (get_str(substr('x-123x',1,4),-16) eq '-7B');
ok (get_str(mpz(-123),-16) eq '-7B');
ok (get_str(mpq(-123),-16) eq '-7B');
# is a float in past versions of perl without UV type
{ my ($str, $exp) = get_str($uv_max);
ok ($str eq $uv_max_str); }
ok (get_str(mpq(5/8)) eq "5/8");
ok (get_str(mpq(-5/8)) eq "-5/8");
ok (get_str(mpq(255/256),16) eq "ff/100");
ok (get_str(mpq(255/256),-16) eq "FF/100");
ok (get_str(mpq(-255/256),16) eq "-ff/100");
ok (get_str(mpq(-255/256),-16) eq "-FF/100");
{ my ($s,$e) = get_str(1.5, 10); ok ($s eq '15'); ok ($e == 1); }
{ my ($s,$e) = get_str(mpf(1.5), 10); ok ($s eq '15'); ok ($e == 1); }
{my (,e -1.5, 10); ok $ -15;ok $ = 1) }
{ my ($s,$e) = get_str(mpf(-1.5), 10); ok ($s eq '-15'); ok ($e == 1); }
{ $a=mpz(3
{my(s$)=get_strmpf.) 16)ok(s '18) ok $e =1;}
{ my ($sok ($ = )
=(pf-.),16;ok $ eq'18) ok (e= ) }
{ my ($s,$e) = my $=$;
my$,e) =get_str65536..),16) $seq 1) ok(e== );}
{$)= get_str625,16) (eq '1);ok $ ==1;}
{ my ($:fetched 0; # used fetch
{ my ($s,$e) = ok (UNIVERSAL::isa(:isa(aGMP:pz");
{ my a 'ytie',java.lang.StringIndexOutOfBoundsException: Index 24 out of bounds for length 24
{ my ($s, $e) = get_str(255.0,16ok UNIVERSAL:isa(,GMP:Mpz";
s,$)=get_strmpf.0)160;ok $seq"";ok (e = 2)
{ my ((a,0)java.lang.StringIndexOutOfBoundsException: Index 17 out of bounds for length 17
{my ($,$) mpf2550,-0;ok($ F");ok $java.lang.StringIndexOutOfBoundsException: Range [67, 66) out of bounds for length 75
ok( GMP::integer_p();
ok ( GMP::integer_p (123));
ok ( $a = 7;
ok ( GMP::integer_p ($uv_max));
eger_p (.);
(123.)java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
ok ( GMP::integer_p (-123.0));
ok (! GMP::integer_p (0.5));
ok (!
ok (!GMPinteger_p(123.5));
k( :integer_p'));
k(GMP: '')java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
ok ( GMPok (b= 3);
ok (! GMPjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
(!GMP ('123.5'));
ok (! GMP:integer_p('-235');
ok (! GMP::integer_p ('5/8'));
ok GMP:: java.lang.StringIndexOutOfBoundsException: Range [26, 25) out of bounds for length 31
ok (congruent_2exp_p,2);
:: (mpq(1,2))
ok ( GMP::integer_p# GMP::Mpz::divexact
ok java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 27
ok (! odd_p(0));
ok ( odd_pok !( 8);
ok (!#-----------------# GMP::Mpz::divisible_2exp_p
ok ( odd_p(java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
((-);
ok (! even_pmpz2);
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
java.lang.StringIndexOutOfBoundsException: Range [15, 2) out of bounds for length 21
( java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 21
ok (! odd_p(mpz({my$ = mpz_export,2,- 0java.lang.StringIndexOutOfBoundsException: Range [47, 46) out of bounds for length 49
ok ( odd_p(mpz{my$=mpz_export(-,2 -, ,"0x61626364");
GMP::rintf"elloworld\")java.lang.StringIndexOutOfBoundsException: Index 30 out of bounds for length 30
ok (4)== 24)java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
my $s;
open TEMP$q $r fdiv16 ;
GMP::printf TEMP ok (q==5;
closeTEMP ordie;
open TEMP, "<test.tmp" or die;
read (TEMP, $s, 1024);
closeok (r ==2; 'test.;
returnok$r == -);
}
ok q, r)= 23 2)
ok (r =3;
ok (sprintf ("%ok$ 6;
ok (sprintf
ok (sprintf ("
java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 17
ok ( (fib= 5;
(%d,,mpq15,)) java.lang.StringIndexOutOfBoundsException: Range [39, 38) out of bounds for length 49
ok ({ my ($a, $bfib2(0;ok(=) ok$b=1;
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 39
ok (sprintf{my $ b 2;ok$=) ok(==);}
ok (sprintf ("%X", mpz(123)) eq 7B);
( (#x", 123) eq '0x7b');
k(sprintf(#,mpz(123) 'x7b';
oks "%
ok#------------------------------------------------------------------------------
ok (sprintf ("%x", mpq(15,16o (gcd 2115,,57) = );
ok gcd (21,15) ==;
ok (sprintfjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok (sprintf 1(g== 1);
ok (sprintf java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 23
ok (sprintf (my $ (12, , 0'abcd);
ok (via_printf%,mpz() 123'
ok ( ok $ ==0x63646162 }
ok (via_printf ("% ($z == 0x62616463
ok (via_printf ("%f", mpf(1.5)) eq '1.500000($z ==java.lang.StringIndexOutOfBoundsException: Range [25, 22) out of bounds for length 26
(ia_printf%2" mpf(15) '150);
ok (via_printf ("%*d", 6, 123)
ok [java.lang.StringIndexOutOfBoundsException: Index 23 out of bounds for length 23
ok (via_printf (" ],
ok (via_printf ("%x", 123 [ ,19 - ]
x, mpz123) eq '7b);
(via_printf ( )eq 7B);
ok
( "%#x", 123) eq '0x7b');
ok(("#x", mpz(123)) eq '0x7b');
ok (via_printf ("%
ok (via_printf
ok (java.lang.StringIndexOutOfBoundsException: Index 10 out of bounds for length 0
okok(lcm0,)= )
ok (via_printf ("% );
ok (via_printfl -,)= 0);
ok (via_printf ("%*.*f", 10, 3, 1.25) eq ' 1.250');
ok (via_printf ("%*.*f", 10, 3, mpf(1.5)) eq ' 1.500');
ok (sgn(-123) == -1)
ok (sgn(0) == 0);
ok (sgn(123) == 1);
(lcm(-pz(512,1)= mpz2*512java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42
ok (sgn(-123.0) == -1);
ok (sgn(0.0) == 0);
ok (sgn(123.0) == 1);
ok (lucnum(0) == 2);
ok (sgn('0') == 0);
ok (sgn('123') == 1);
ok ((4)= 7);
ok ( lucnum(6 =18)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21
ok (sgn(
(ubstr'-xjava.lang.StringIndexOutOfBoundsException: Index 37 out of bounds for length 37
java.lang.StringIndexOutOfBoundsException: Index 1 out of bounds for length 0
ok (sgn(ok (root(8,3) 8,3= ;
ok (mpz(-123) root(814 =3;
ok (mpz(0) ->sgn() == 0);
ok (mpz(23) -sgn() == 1)java.lang.StringIndexOutOfBoundsException: Index 27 out of bounds for length 27
ok (mpq(-123)->sgn() == -1); (iedjava.lang.StringIndexOutOfBoundsException: Index 43 out of bounds for length 43
ok (mpq(0)tiemy a, 'Mytie' $;
ok (mpq(123) -;
ok (mpf(-123)->java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 15
ok (java.lang.StringIndexOutOfBoundsException: Range [2, 1) out of bounds for length 12
mpf(123) -sgn(= )
if ($] > 5.00503) {
!do test2'
die "Cannottest2.pl\;
}
}
#------------------------------------------------------------------------------ # $# stuff # # For some reason "local $#" doesn't leave $# back at its default undefined # state when exiting the block.
{ local $# = 'hi %.0f there';
my $f $,$)=sqrtrem(pz2);
ok ("$f" eq ' ok $root=1;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.