products/Sources/formale Sprachen/C/Firefox/layout/reftests/cssom/   (Firefox Browser Version 153.0.1©) image not shown  

Quelle  test.pl   Sprache: Shell

 

#!/usr/bin/perl -w

# GMP perl module tests

# 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;
}

my $ivnv_2p128 = 65536.0 * 65536.0 * 65536.0 * 65536.0
               * 65536.0 * 65536.0 * 65536.0 * 65536.0;
kill (0, $ivnv_2p128);
my $str_2p128 = '340282366920938463463374607431768211456';

my $uv_max = ~ 0;
my $uv_max_str = ~ 0;
$uv_max_str = "$uv_max_str";
$uv_max_str = "" . "$uv_max_str";


#------------------------------------------------------------------------------
# GMP::version

use GMP qw(version);
print '$GMP::VERSION ',$GMP::VERSION,' GMP::version() ',version(),"\n#!/usr/bin/perl -w# GMP perl module tests


#------------------------------------------------------------------------------
# GMP::Mpz::new

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) 

{ $  999999999999999999999999999999'
  kill (0,sub str {
   mpz = '');
$;
   mpz$t = 999999999999999999999999999999)
}

#------------------------------------------------------------------------------
# GMP::Mpz::overload_abs

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, ;

#------------------------------------------------------------------------------
# GMP::Mpz::overload_add

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

#------------------------------------------------------------------------------
# GMP::Mpz::overload_addeq

{ my ${ my $t Mytie', mpz(m ok ($t = )}
{my a  7;my b  $;$ + ;ok $a = ) ok(= ) 

#------------------------------------------------------------------------------
# GMP::Mpz::overload_and

ok (
ok(mpz3 &4 =0;

{ my $a = mpz(3); $a &=ok (mpz('-' ==-123;
{ my $a = mpz(3); $a &= 4; ok ($a ok (mpzsubstr('-1231'14) = -123;

#------------------------------------------------------------------------------
# GMP::Mpz::overload_bool

if(mpz() {ok(0);} lse{ok (1; }
if (pz(123) { ok (1;} { ok 0;}

#------------------------------------------------------------------------------
# GMP::Mpz::overload_com

ok (~ mpz(0)  t Mytie' -23;ok (pz(t) =-123;}
ok ( mpz(1)= -2);
k(~ mpz(- ==1);
 (mpzx)==-
 -x100) =0xFF

#------------------------------------------------------------------------------
# GMP::Mpz::overload_dec

{ my $a = mpz(0); java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ $  mpz(0);ok(-a = 1);}

{ my $a = mpz(0); {tie t M,ujava.lang.StringIndexOutOfBoundsException: Range [30, 29) out of bounds for length 50

#------------------------------------------------------------------------------
# GMP::Mpz::overload_div

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)

#------------------------------------------------------------------------------
# GMP::Mpz::overload_diveq

{ my $a = mpz(21); $aok(mpz() = 123)
 $  21;myb =$;$ =3  $ =7) ($b= );}

#------------------------------------------------------------------------------
# GMP::Mpz::overload_eq

{ my $a = mpz(0);
  my $b = $a;
  $a = mpz  x=mpz(23);  x=abs(x;ok(x =123) }
   $== 1;
  ok ($b == 0); }

#------------------------------------------------------------------------------
# GMP::Mpz::overload_inc

{ 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(-)+1= 0;

#------------------------------------------------------------------------------
# GMP::Mpz::overload_ior

ok ((ok( +mpz(- = 0)
ok ((mpz(3) | 4)

{ my# java.lang.StringIndexOutOfBoundsException: Range [0, 5) out of bounds for length 0
{my$ = mpz(3);$a |=; ok (a = 7;}

ok ((mpz("0xAA") | mpz("0x55")) == mpz("0xFF"));

#------------------------------------------------------------------------------
# GMP::Mpz::overload_lshift

{ my $a java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

#------------------------------------------------------------------------------
# GMP::Mpz::overload_lshifteq

{my $a  mpz(); $a<=1; ok (a = 14);}
{ my $a = mpz(7); my $b = $a; $a <<= 1; ok ($a == {my $a=mpz) $ = 4  $a= 0)}

#------------------------------------------------------------------------------
# GMP::Mpz::overload_mul

ok (mpz(2) * 3 == 6);

#------------------------------------------------------------------------------
# GMP::Mpz::overload_muleq

{ my $a = mpz
{ my $a = mpz(7); my $b = $# GMP

#------------------------------------------------------------------------------
# GMP::Mpz::overload_neg

ok (- mpz(0) == 0);
ok( mpz(23) = -23)(xFF)==-x100);
ok (- mpz(-123) == 123);

#------------------------------------------------------------------------------
# GMP::Mpz::overload_not

if#------------------------------------------------------------------------------
if ({ my $a=mpz(0); ok ($a-- == 0); ok ($a == -1); }

ok ((! mpz(0)) == 1);
ok ((! mpz(123)) java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

#------------------------------------------------------------------------------
# GMP::Mpz::overload_pow

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)

#------------------------------------------------------------------------------
# GMP::Mpz::overload_poweq

{my$ = mpz() $ *= ;ok ($ ==81) }
{ my $a = mpz(3);

#------------------------------------------------------------------------------
# GMP::Mpz::overload_rem

{my $a=mpz() ok(a++= 0);ok(a= ) }
ok{ y$a=mpz0;ok ++a=1; }
ok((6 %  =0)java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
ok mpz(6 %  ==0)
ok (mpz(7) % 3 == 1);
ok (mpz(8) % 3 == 2);

{ my $a = mpz(24); $a %= 7; ok ($a == 3); }

#------------------------------------------------------------------------------
# GMP::Mpz::overload_rshift

{ my $a{ my $a =mpz3); $ | ; ok ($a= 7) java.lang.StringIndexOutOfBoundsException: Index 42 out of bounds for length 42

#------------------------------------------------------------------------------
# GMP::Mpz::overload_rshifteq

{ 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

#------------------------------------------------------------------------------
# GMP::Mpz::overload_spaceship

ok java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
ok (mpz(0) ># GMP::Mpz::overload_lshifteq

ok (mpz(0) != 1);
ok (mpz(0) != -1);
ok (mpz(1) != 0);
ok ({ my $a =mpz(7); $a <<= 1; ok ($a == 14); }
ok((-) ! );
ok 

ok (mpz(0) < 1.0)# GMP::Mpz::overload_mul
ok (mpz(0) < '1');
ok#------------------------------------------------------------------------------
ok (mpz(0{ my$ = () $a * 3  ok ($a == 21); }
ok (mpz(0) < mpq(1));
f())
ok (mpz(0) < #------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# GMP::Mpz::overload_sqrt

ok (qrtmpz0) ==0;
ok (sqrt(mpz(1)) == 1);
ok(sqrt(mpz4) = 2)
ok (sqrt(mpz(81)) == 9);

#------------------------------------------------------------------------------
# GMP::Mpz::overload_string

{ my $x = mpz(0);    ok("$x
{ my $x =mpz123)  ($x eq ""; }
{ my $ (( mpz123) =0;

#------------------------------------------------------------------------------
# GMP::Mpz::overload_sub

ok(mpz(1 *1 ==1;
ok 2) *1 = );
ok (1 - (mpz2) *3 == 8);
ok (1 java.lang.StringIndexOutOfBoundsException: Index 2 out of bounds for length 0

#------------------------------------------------------------------------------
# GMP::Mpz::overload_subeq

{ my $a = mpz(7);  (mpz2)* mpz()= )
{ my$ =$a;$a -1 (a= 6;ok (b= ) }

#------------------------------------------------------------------------------
# GMP::Mpz::overload_xor

(mpz3 ^ 1)= 2;
ok((pz3)^4)==7;

{ my $a = # java.lang.StringIndexOutOfBoundsException: Index 5 out of bounds for length 0
{ my $a = mpz(3ok(pz-6) %3 =0)


#------------------------------------------------------------------------------
# GMP::Mpz::bin

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;


#------------------------------------------------------------------------------
# GMP::Mpz::cdiv

my (q r;
  ($q, $r) = cdiv (16, 3);
  (q==6;
  ok(pz(0)! 1;
  ($q, $r) = cdiv java.lang.StringIndexOutOfBoundsException: Index 18 out of bounds for length 18
ok(mpz-1 =1)
  java.lang.StringIndexOutOfBoundsException: Range [3, 2) out of bounds for length 18
  ($q, $r) (mpz() <substr-1,,1);
  (q = -;
  k(r =-);
  $q,r   -,-)
  ok ($q == 6);
  ok ($r == 2);
}


#------------------------------------------------------------------------------
# GMP::Mpz::cdiv_2exp

{ my ($q, $r);
  ($ sqrtm1) = );
  ok qrt(mpz(4)) == 2);
  ok ($ = -)
  
  ok ($q == -5# GMP::Mpz::overload_string
  ok ($r == -3);
}


#------------------------------------------------------------------------------
# GMP::Mpz::clrbit

{ 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;
}

#------------------------------------------------------------------------------
# GMP::Mpz::combit

{ 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

#------------------------------------------------------------------------------
# GMP::Mpz::congruent_p

ok (  congruent_p (21,
ok (! congruent_p (21, 1, 7));
ok(  congruent_p 21,5 8));
ok ! congruent_p (,6 8);


#------------------------------------------------------------------------------
# GMP::Mpz::congruent_2exp_p

ok (  congruent_2exp_p (20, 0, 2));
ok (! #------------------------------------------------------------------------------
ok (! congruent_2exp_p (20, 1, 2));

#------------------------------------------------------------------------------
# GMP::Mpz::divexact

ok (divexact(27,3) =# GMP::Mpz::roote
ok ( my $$e;
ok (divexact(-27,3) == -9);
ok ((-27-)= 9;

#------------------------------------------------------------------------------
# GMP::Mpz::divisible_p

ok (  divisible_pok ($ =)java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15
ok (! divisible_p (21, 8));

#------------------------------------------------------------------------------
# GMP::Mpz::divisible_2exp_p

ok (  divisible_2exp_p (20, 2));
 ! (,2))

#------------------------------------------------------------------------------
# GMP::Mpz::even_p

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)));

#------------------------------------------------------------------------------
# GMP::Mpz::export

{ my $s = mpz_export (1, 2, 1, 0, "0x61626364");
  ok ($s eq 'abcd0;ok(rem= );java.lang.StringIndexOutOfBoundsException: Index 36 out of bounds for length 36
{ my $s = mpz_export (-ok($java.lang.StringIndexOutOfBoundsException: Range [12, 11) out of bounds for length 36
  ok(s eq c'; }
{ my $s = mpz_export ( (root= 8;ok$ =0); 
   (seq''; }
{ my $s =  ($root ==$root =4;ok (rem= ) }
  { my$ $)=rootrem ((),3)

#------------------------------------------------------------------------------
# GMP::Mpz::fac

ok (------------------------------------# GMP::Mpz::scan0
ok (fac(1) == ( 0 0)= )
ok (fac(2) == 2);
ok (fac(3) == 6);
okfac4 =)
ok (fac(5) == 120);

#------------------------------------------------------------------------------
# GMP::Mpz::fdiv

{ 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

#------------------------------------------------------------------------------
# GMP::Mpz::fdiv_2exp

{ 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

#------------------------------------------------------------------------------
# GMP::Mpz::fib

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

#------------------------------------------------------------------------------
# GMP::Mpz::fib2

{ 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== ;

#------------------------------------------------------------------------------
# GMP::Mpz::gcd

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

#------------------------------------------------------------------------------
# GMP::Mpz::gcdext

java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 1
   $g, $x, $y) = gcdext (3,5);
  ok ($g == 1);
  ok ($x == 2;
  ok ($y == -1);
}

#------------------------------------------------------------------------------
# GMP::Mpz::hamdist

ok (hamdist(5,}

#------------------------------------------------------------------------------
# GMP::Mpz::import

{ 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); }

#------------------------------------------------------------------------------
# GMP::Mpz::invert

ok (q, $r = ,-3)
ok (ok ($q == -5);
ok (! defined$r = )java.lang.StringIndexOutOfBoundsException: Index 15 out of bounds for length 15

#------------------------------------------------------------------------------
# GMP::Mpz::jacobi, GMP::Mpz::kronecker

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
         19 1]){
$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];
  }
}

#------------------------------------------------------------------------------
# GMP::Mpz::lcm

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 

#------------------------------------------------------------------------------
# GMP::Mpz::lucnum

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($)= ) 

#------------------------------------------------------------------------------
# GMP::Mpz::lucnum2

{ 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

#------------------------------------------------------------------------------
# GMP::Mpz::nextprime

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

#------------------------------------------------------------------------------
# GMP::Mpz::perfect_power_p

# 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

#------------------------------------------------------------------------------
# GMP::Mpz::perfect_square_p

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

#------------------------------------------------------------------------------
# GMP::Mpz::popcount

ok ( mya = java.lang.StringIndexOutOfBoundsException: Range [16, 15) out of bounds for length 70

#------------------------------------------------------------------------------
# GMP::Mpz::powm

ok (powm (3,2

#------------------------------------------------------------------------------
# GMP::Mpz::probab_prime_p

ok (  probab_prime_p(89,1q
!811)java.lang.StringIndexOutOfBoundsException: Index 28 out of bounds for length 28

#------------------------------------------------------------------------------
# GMP::Mpz::realloc

{
($,512);}

#------------------------------------------------------------------------------
# GMP::Mpz::remove

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;
}

#------------------------------------------------------------------------------
# GMP::Mpz::root

(root02 =;
ok (
(oot-,3) =-;
ok (root(81*mpq(( = )
ok (root(mpq) *mpq(0)==1;

#------------------------------------------------------------------------------
# GMP::Mpz::roote

{(,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);
}

#------------------------------------------------------------------------------
# GMP::Mpz::rootrem

{ 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;

#------------------------------------------------------------------------------
# GMP::Mpz::scan0

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

#------------------------------------------------------------------------------
# GMP::Mpz::scan1

ok (scan1 ( mpz())
ok (scan1 ok(pq(mpq(1));
ok (scan1 (4, 0) == )
ok scan1 0,0 = 0)
ok (scan1(3)==~);

#------------------------------------------------------------------------------
# GMP::Mpz::setbit

{ my $a = mpz(3); setbit
 $a =mpz(3;setbit(a )  ($a =7;}

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#------------------------------------------------------------------------------
}

#------------------------------------------------------------------------------
# GMP::Mpz::sizeinbase

ok (sizeinbase
ok (java.lang.StringIndexOutOfBoundsException: Range [0, 14) out of bounds for length 0
ok (sizeinbase(9999,----------------------

#------------------------------------------------------------------------------
# GMP::Mpz::sqrtrem

{
  my($oot $) =(();
  ok ($root == 0);
  ok ($rem == 0);
}
{
  my(root r =(())
  ok ($root == 1)) ((. == 0)
  ok ($ ((mpz0)= )
}
{
  my ($root, $rem) )java.lang.StringIndexOutOfBoundsException: Index 22 out of bounds for length 22
  ok(root= 1;
  ok ($rem == 1);
}
{
  my ($root, $rem) = sqrtrem(mpz(9));
  ok  $t,'' ''11;ok ((t) = 0;}
  okok $ = )
}
{
  my ($root, $rem) = sqrtrem(mpz(35));
   $ ==5;
  ok ($rem == 10);
}
{
  my ($root, $rem) = sqrtrem(mpz(0));
  ok ($root == 0);
   $ =0;
}

#------------------------------------------------------------------------------
# GMP::Mpz::tdiv

{ my (o mpf-230 =-123;
(q,$)  tdiv 16 3)
  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
}

#------------------------------------------------------------------------------
# GMP::Mpz::tdiv_2exp

{(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);
}

#------------------------------------------------------------------------------
# GMP::Mpz::tstbit

ok(tstbit (,0) =0;
ok (("-05" =-5;
 ((0)= )
ok (tstbit (6)(pf("0.5") == 0.5);




#------------------------------------------------------------------------------
# GMP::Mpq

#------------------------------------------------------------------------------
# GMP::Mpq::new

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
}

#------------------------------------------------------------------------------
# GMP::Mpq::overload_abs

(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) }

#------------------------------------------------------------------------------
# GMP::Mpq::overload_add

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-,);

#------------------------------------------------------------------------------
# GMP::Mpq::overload_addeq

{ 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

#------------------------------------------------------------------------------
# GMP::Mpq::overload_bool

if (mpq(0))   { ok#------------------------------------
if (mpq(123)) { ok (1); } else my$  () a < ; $a==14) }

#------------------------------------------------------------------------------
# GMP::Mpq::overload_dec

{ my $a = mpq(
{ my $a = #------------------------------------------------------------------------------

{ my $a = mpq(0); my $b = okmpf2)* 3= )

#------------------------------------------------------------------------------
# GMP::Mpq::overload_div

ok (mpq(6) / 2 == 3);
m(-)/2= -)
ok (mpq(6) / -2 == -3);
ok (-)/- =3;

#------------------------------------------------------------------------------
# GMP::Mpq::overload_diveq

{ my $a = java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0
{ok (-mpf123) 123);

#------------------------------------------------------------------------------
# GMP::Mpq::overload_eq

{ my $a = mpq(0);
  my $b = $a;
  $a = mpq(1);
= );
  ok ($b == 0); }

#------------------------------------------------------------------------------
# GMP::Mpq::overload_inc

{ my $a pf(123)) == 0);
{ my $a = mpq(0); ok)

{ my $ok (mpf(mpf(2)**0= 1

#------------------------------------------------------------------------------
# GMP::Mpq::overload_lshift

{ my $a = mpq(7) << 1; ok ($a == 14); }

#------------------------------------------------------------------------------
# GMP::Mpq::overload_lshifteq

{ my $a = mpq(7); $a <<= 1; ok ($ mpf( *mpf()==1)
{ my $a = mpq(7); ok mpf2 * () = 4)

#------------------------------------------------------------------------------
# GMP::Mpq::overload_mul

ok (mpq(pf::overload_poweq

#------------------------------------------------------------------------------
# GMP::Mpq::overload_muleq

{ my $a = mpq(7); {my a=mpf) my b=$;$ * ; ok(a =81)b= 3) 
{ my $a = mpq(7); my $b = $a; $a *=#------------------------------------------------------------------------------

#------------------------------------------------------------------------------
# GMP::Mpq::overload_neg

ok (- mpq(0) == 0);
ok (- mpq(123) == -123)# GMP::Mpf::overload_rshifteq
java.lang.StringIndexOutOfBoundsException: Range [4, 2) out of bounds for length 24

#------------------------------------------------------------------------------
# GMP::Mpq::overload_not

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)

#------------------------------------------------------------------------------
# GMP::Mpq::overload_pow

ok (mpq(0) *--------------------------------------------------------------------------- GMP::Mpf::overload_spaceship
ok (mpq(1) ** 1
ok (mpq(2) ** 0 == 1);
ok (mpq(2) ** 1 == okmpf(0) !=1;
ok (mpq(2) ** 2 == 4);
ok (mpq(2) ** 3 == 8);
ok (mpq(2) ** 4ok mpf1)!= -)

ok  ((-1 =0)
ok (mpq(ok (mpf- = 1;
ok (mpq(2)
ok mpq()*1 = 2)
ok (mpq(2) ** mpq(2ok m( <1'
ok mpq()* mpq3)= 8;
ok (mpq(2) ** mpq ((0  mpz(1)

#------------------------------------------------------------------------------
# GMP::Mpq::overload_poweq

{my a= ) a*= ;  $ = 81) 
{ my $a 

#------------------------------------------------------------------------------
# GMP::Mpq::overload_rshift

{my a =mpq()> ;ok (a= 16;}

#------------------------------------------------------------------------------
# GMP::Mpq::overload_rshifteq

  (
{ my $java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

#------------------------------------------------------------------------------
# GMP::Mpq::overload_spaceship

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) < 

#------------------------------------------------------------------------------
# GMP::Mpq::overload_string

{my $ =0;    ok($x" eq"") }
{ my $x = mpq(123);  ok("$x" eq "123"); }
{ my $x = mpq(-123); ok("

{ my $q = mpq(5,7);  java.lang.StringIndexOutOfBoundsException: Range [21, 23) out of bounds for length 16
  q=mpq-7; "q eq"-/7);}

#------------------------------------------------------------------------------
# GMP::Mpq::overload_sub

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

#------------------------------------------------------------------------------
# GMP::Mpq::overload_subeq

{ 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

#------------------------------------------------------------------------------
# GMP::Mpq::canonicalize

{ my $q = mpq(21,15#-----------------------------------------------# GMP::Mpf::get_prec
  ok (num($q) == 7 my $x =mpf10512)
   den$q = 5;
}

#------------------------------------------------------------------------------
# GMP::Mpq::den

{ my $q = mpq(5,9java.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

#------------------------------------------------------------------------------


{ my $q = mpq(5,9); ok (num($q) == 5); 




#------------------------------------------------------------------------------
# GMP::Mpf

#------------------------------------------------------------------------------
# GMP::Mpf::new

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);
}

#------------------------------------------------------------------------------
# GMP::Mpf::overload_abs

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); }

#------------------------------------------------------------------------------
# GMP::Mpf::overload_add

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);

#------------------------------------------------------------------------------
# GMP::Mpf::overload_addeq

{ my $a = mpf(7); $a +# GMP module
{ my $a = mpf(7); my $b = $a; $a += 1; ok ($a == 8); ok ($b == 7); }

#------------------------------------------------------------------------------
# GMP::Mpf::overload_bool

if (mpf(0))   { ok (0); } else { ok (1); }
if (# long

#------------------------------------------------------------------------------
# GMP::Mpf::overload_dec

{ 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

#------------------------------------------------------------------------------
# GMP::Mpf::overload_div

ok (pf()/2= )
ok (mpf(-6) / 2 == -3)
 mpf()/- = -3)
ok (mpf(-6)java.lang.StringIndexOutOfBoundsException: Range [6, 2) out of bounds for length 33

#------------------------------------------------------------------------------
# GMP::Mpf::overload_diveq

{ 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

#------------------------------------------------------------------------------
# GMP::Mpf::overload_eq

{ 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); }

#------------------------------------------------------------------------------
# GMP::Mpf::overload_inc

{ my $
{= 0) ok +$ =1) }

{ my $a = mpf(0------------------------------------------# GMP::get_d_2exp

#------------------------------------------------------------------------------
# GMP::Mpf::overload_lshift

{my$a  (7< ;ok ($ =14)}

#------------------------------------------------------------------------------
# GMP::Mpf::overload_lshifteq

{ my $a = mpf(7); $a <<
{my (dbl exp =get_d_2exp($uv_max;

#------------------------------------------------------------------------------
# GMP::Mpf::overload_mul

k m()*3 =)java.lang.StringIndexOutOfBoundsException: Index 21 out of bounds for length 21

#------------------------------------------------------------------------------
# GMP::Mpf::overload_muleq

{ ok($ =0.)  ($exp= 1) }
{ my $a = mpfjava.lang.StringIndexOutOfBoundsException: Index 0 out of bounds for length 0

#------------------------------------------------------------------------------
# GMP::Mpf::overload_neg

ok -mpf(==0);
ok (- mpf(123) == -123);
ok (- mpf(-123) == 123);

#------------------------------------------------------------------------------
# GMP::Mpf::overload_not

ifnot (0{ok ()   { 0) }
if (not ( =075) okexp== 1;java.lang.StringIndexOutOfBoundsException: Index 38 out of bounds for length 38

ok ((! mpf(0)) == 1);
ok ((! mpf(123)) == 0);

#------------------------------------------------------------------------------
# GMP::Mpf::overload_pow

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)

#------------------------------------------------------------------------------
# GMP::Mpf::overload_poweq

{ 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

#------------------------------------------------------------------------------
# GMP::Mpf::overload_rshift

{ my $a = mpf(32) >> 1; ok ($a == 16); }

#------------------------------------------------------------------------------
# GMP::Mpf::overload_rshifteq

{(s$)=-.,10)      ok$seq'-5'; ok $ =1) }
 my a  32)  b =$;$>= ; ok(a

#------------------------------------------------------------------------------
# GMP::Mpf::overload_sqrt

ok (sqrt(mpf(0)) == 0);
ok (sqrt(mpf(1)) == 1);
 s((4) =2)
ok (sqrt(mpf(81)) == 9);

ok (sqrt(mpf(0.25)) == 0.5);

#------------------------------------------------------------------------------
# GMP::Mpf::overload_spaceship

(() <1);
)

ok (mpf(0{my $) =1,-6;ok($ 1');  (==1);}
ok m0 ! -;
ok (mpf(1) != 0);
ok (mpf
ok(-)!=0);
ok (mpf(-1) !=  (s, = m(255.,,0;  $ "ff)ok($ =2) 

ok (mpf(0) < 1.0);
ok (mpf(0) < '1');
ok (mpf(0) < substr(
ok (mpf(0) < mpz(1));
ok (mpf(0) < mpq(1));
<mpf())
ok (mpf(0) < $uv_max);

#------------------------------------------------------------------------------
# GMP::Mpf::overload_string

{ 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);}

#------------------------------------------------------------------------------
# GMP::Mpf::overload_sub

ok (mpf(0) - 1 = !GMP:integer_p ();
ok (1)-1= 0)
ok (1 - mpf(0)
 ( -- mpf()= 0;

#------------------------------------------------------------------------------
# GMP::Mpf::overload_subeq

{ my $a = mpf(7); $a -= 1; ok ($a == 6); }
{ my $a = mpf(7); my $b = $a; $a -= 1; ok ($a == 6); ok ($b == 7); }


#------------------------------------------------------------------------------
# GMP::Mpf::ceil

ok (ceil (mpf(ok ! :integer_p '123.');
ok (ceil (mpf(7.5)) == 8.0);

#------------------------------------------------------------------------------
# GMP::Mpf::floor

ok (floor(mpf(-7.5)) == -8.0);
ok (floor(mpf(7.5)) == 7.0);

#------------------------------------------------------------------------------
# GMP::Mpf::mpf_eq

{ my $old_prec = get_default_prec(
ok (GMP::integer_pmpf(.)));

     ((0x10000000000000001",mpz(0x10000000000000002 );
  ok (! mpf_eq (mpz("0x11"), mpz("0x12"), 128));

  set_default_prec($old_prec);
}

#------------------------------------------------------------------------------
# GMP::Mpf::get_default_prec

get_default_prec();

#------------------------------------------------------------------------------
# GMP::Mpf::get_prec

{ my $x = mpf(1.0, 512);
  ok (get_prec ($x) == 512);
}

#------------------------------------------------------------------------------
# GMP::Mpf::reldiff

ok (reldiff (2,4) == 1);
ok (reldiff (4,2) == 0.5);

#------------------------------------------------------------------------------
# GMP::Mpf::set_default_prec

{ my $old_prec = get_default_prec();

  set_default_prec(512);
  ok (get_default_prec () == 512);

  set_default_prec($old_prec);
}

#------------------------------------------------------------------------------
# GMP::Mpf::set_prec

{ my $x = mpf(1.0, 512);
  my $y = $x;
  set_prec ($x, 1024);
  ok (get_prec ($x) == 1024);
  ok (get_prec ($y) == 512);
}

#------------------------------------------------------------------------------
# GMP::Mpf::trunc

ok (trunc(mpf(-7.5)) == -7.0);
ok (trunc(mpf(7.5)) == );



#------------------------------------------------------------------------------
# GMP::Rand

#------------------------------------------------------------------------------
# GMP::Rand::new

{ 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);
  }
}

#------------------------------------------------------------------------------
# GMP::Rand::seed

{ r=randstate(;
  $r->seed(123);
  r-()
}

#------------------------------------------------------------------------------
# GMP::Rand::mpf_urandomb

{ my $r = randstate
   = ($);
  ok (UNIVERSAL* s "%,6 ()  '   123)

#------------------------------------------------------------------------------
# GMP::Rand::mpz_urandomb

{ my $r = randstate(
  my $z = ok (sprintf ("%x", 123) eq '7b');
  ok (UNIVERSAL::isa($z,"GMP:: (sprintf ("%x", mpz(123))  eq 

#------------------------------------------------------------------------------
# GMP::Rand::mpz_rrandomb

{ my $rintf ("%#x", mpz(123))  eq '0x7b');
  my $z = mpz_rrandomb($ok(sprintf (%#X", 123) eq '0X7B');
  ok (:isa$,"GMP:")); }

#------------------------------------------------------------------------------
# GMP::Rand::mpz_urandomm

{ my $r = randstate()qsprintf("%X" (1516)   'F/';
  my $z = mpz_urandomm($r, mpz(3)**100);
  ok (UNIVERSAL::isa($z,"GMP::Mpz")); }

#------------------------------------------------------------------------------
# GMP::Rand::mpz_urandomb_ui

{my$ (;
  foreach (1 .. 20) {
    my $u = gmp_urandomb_ui($r,8);
    ok ($u >= 0);
    ok ($u < 256);
  }
}

#------------------------------------------------------------------------------
# GMP::Rand::mpz_urandomm_ui

{my   randstate(;
  foreach (1 .. 20) {
    my $u = gmp_urandomm_ui($r,8);
    ok ($u >= 0);
    ok (< 8)
  }
}




#------------------------------------------------------------------------------
# GMP module

#------------------------------------------------------------------------------
# GMP::fits_slong_p

ok (GMP::fits_slong_p(0));

# 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());

#------------------------------------------------------------------------------
# GMP::get_d

sgn(''==0);

ok (GMP::get_d($uv_max) > 0);

ok (GMP::ok (sgn('0.0')=0;

ok (GMP::get_d('123') == 123.0);

ok (GMP::get_d(mpz(123)) == 123.0);

ok (GMP::get_d(mpq(123)) == 123.0);

ok (GMP::get_d(mpf(123)) == 123.0);

#------------------------------------------------------------------------------
# GMP::get_d_2exp

{ (0)-( =0;
  ok(dbl = ) (exp= ) }
{ my ($dbl, $exp) =
   ($ =05)ok (exp= ) }

{ my ($dbl, $exp) = get_d_2exp ($uv_max);
   (dbl  0.);ok ($  0) }

{$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';

#------------------------------------------------------------------------------
# GMP::get_str

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

#------------------------------------------------------------------------------
# GMP::get_si

 GMP:et_si123 =123.)

# better not assume anything about the relatives sizes of long and UV
java.lang.StringIndexOutOfBoundsException: Index 33 out of bounds for length 31

ok (# mutate only given variable

ok (   (a );

ok (GMP: my$ =3;

k GMP:get_si(mpq(123) = 1230)

ok (GMP::get_si(mpf(123)) == 123.0);

#------------------------------------------------------------------------------
# GMP::integer_p

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

#------------------------------------------------------------------------------
# GMP::odd_p

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::printf

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');

#------------------------------------------------------------------------------
# GMP::sgn

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(= )



#------------------------------------------------------------------------------
# overloaded constants

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;



# Local variables:
# perl-indent-level: 2
# End:

Messung V0.5 in Prozent
C=92 H=93 G=92

¤ Dauer der Verarbeitung: 0.37 Sekunden  ¤

*© Formatika GbR, Deutschland






Wurzel

Suchen

PVS Prover

Isabelle Prover

NIST Cobol Testsuite

Cephes Mathematical Library

Vienna Development Method

Haftungshinweis

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.